-->
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: Question about Transactions, Commit and Rollback
PostPosted: Thu Jul 14, 2005 4:45 am 
Newbie

Joined: Thu Jul 14, 2005 4:30 am
Posts: 2
Hi,

I am a newbie to Hibernate. Got a few doubts I need to clear up.

1) Are transactions meant to be atomic? I.e. each transaction should only be equivalent to one sql statement?

2) Say I have multiple deletions I want to do and these deletions are on different tables which have parent-child relationship. Currently I only initiate 1 transaction and uses it to perform all the deletions. Finally then I call a commit(). Will all the deletions be performed at one go?

3) Based on the previous scenario, say one of the deletions (in the middle) fails. How can I ensure that I rollback all the previous deletions I have done earlier?

Hope someone can help on this. Thanks.

Regards,
Nicole


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 9:20 am 
Expert
Expert

Joined: Thu Jan 29, 2004 2:31 am
Posts: 362
Location: Switzerland, Bern
Chapter 12 of the reference manual
or
if you want more details Chapter 5 of Hibernate in Action
should answer your questions.

HTH
Ernst


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.