-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to change ordering of insert queries
PostPosted: Tue Jun 13, 2006 3:24 pm 
Newbie

Joined: Tue Jun 13, 2006 9:03 am
Posts: 18
Is is possible to change the way Hibernate orders the queries when doing inserts? I have a list of chocolates and a list of boxes that hold the chocolates, and would like to insert all of the chocolates before the boxes into the database in order to avoid constraint issues. I'm encountering an issue where it looks like hibernate is inserting the boxes before the chocolates.

nefi


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 13, 2006 4:14 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
add an association between boxes and choclates with cascade save .
And save the box . Hibernate would figure out which ones to insert
first.

Or if you have done that already could you post the mapping and the code which saves the objects.

_________________
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.