-->
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: can I save multiple objects in a transaction?
PostPosted: Wed Nov 17, 2004 10:03 am 
Newbie

Joined: Mon Nov 15, 2004 1:42 pm
Posts: 11
Hibernate version:
2.1.6

How can I handle objects created and saved in a while loop. Is it ok to commit the transaction on every iteration of the while loop? Can I save multiple objects on each iteration, in one transaction?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 9:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hibernate does nothing special or extra in terms of transaction handling.
So there is no limit imposed thus you can structure your code to do a full transaction cycle per-iteration or do a subset of the data or all of the data in a single transaction. Which way you go depends on the use case requirements.


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.