This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate TransientObjectException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate TransientObjectException" Watch "Hibernate TransientObjectException" New topic
Author

Hibernate TransientObjectException

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 256
Hello
My current scenario first.

Following are the relationships for domain objects A, B and C

A 1---------------many B (cascade = "all" inverse="true")
A 1---------------many C (cascade = "all" inverse="true")
B 1---------------many C (cascade = "all" inverse="true")

I do the following in this order.


I get the following.
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: foo.bar.packages.C


What am I doing wrong here ?

I'm hoping to do this with one save call, because that defines our transaction boundary call.

Please help. Thanks.
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 256
Anyone ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate TransientObjectException
 
Similar Threads
what changes should i made in save method in one-to-many relationships
the many vs one sides of a cascaded hibernate object...
inverse & cascade attribute - Help !!!
Cascade Save Not Working
(N+1) selects � Hibernate bug?