net.sf.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.abc.model.MyTable2

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via java2s.com by Unknown author, 10 months ago
object references an unsaved transient instance - save the transient instance before flushing: com.abc.model.MyTable2
via Coderanch by Sebastiaan Kortleven, 10 months ago
object references an unsaved transient instance - save the transient instance before flushing: com.lmsintl.its.aqt.dto.Query
via Coderanch by Sebastiaan Kortleven, 10 months ago
object references an unsaved transient instance - save the transient instance before flushing: com.lmsintl.its.aqt.dto.UserQuery
via GitHub by wezell
, 2 years ago
object references an unsaved transient instance - save the transient instance before flushing: com.dotmarketing.beans.Identifier
net.sf.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.abc.model.MyTable2
at net.sf.hibernate.impl.SessionImpl.throwTransientObjectException(SessionImpl.java:2652)
at net.sf.hibernate.impl.SessionImpl.getEntityIdentifierIfNotUnsaved(SessionImpl.java:2644)
at net.sf.hibernate.type.EntityType.getIdentifier(EntityType.java:66)
at net.sf.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:46)
at net.sf.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:154)
at net.sf.hibernate.loader.Loader.bindPositionalParameters(Loader.java:673)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:712)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:57)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.