jQuery in Action, 2nd edition*
The moose likes Object Relational Mapping and the fly likes Hibernate: cascade save problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate: cascade save problem" Watch "Hibernate: cascade save problem" New topic
Author

Hibernate: cascade save problem

Sebastiaan Kortleven
Ranch Hand

Joined: Mar 12, 2004
Posts: 81
Hello all,

I've got my own Query object which consists of several WhereItem objects, which can consist of a Subquery object which consists of a Query object (not the same as the original), and so on..

So:

Query -> WhereItem -> Subquery -> Query -> ...

When saving the main Query, I woul like all the rest to be saved too..
I've set the cascade option to all for all collections, but I still get a TransientObjectException..

What am I doing wrong?

Here's part of the exception:


Here are the relevant parts of the mapping files:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate: cascade save problem
 
Similar Threads
Could not synchronize database
problem with hibernate mapping
problem saving with foreign key error
Hibernate: many-to-many cascading
Hibernate inserting man-to-one fails