-->
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.  [ 3 posts ] 
Author Message
 Post subject: Multiple Transaction Handling in Hibernate
PostPosted: Wed Apr 25, 2012 7:43 am 
Newbie

Joined: Wed Apr 25, 2012 6:52 am
Posts: 2
How to update multiple transaction records in a single shot through hibernate

Requirement:
I am having five rows in a html table.
now, i am updating 1st row and 2nd rows value and deleting the 3rd row.
When i click on the save button, all the modified and deleted rows should be affected in backend.

How to achieve this multiple transaction in a single shot as like JDBC cached row set.


Top
 Profile  
 
 Post subject: Re: Multiple Transaction Handling in Hibernate
PostPosted: Sun Apr 29, 2012 9:43 am 
Newbie

Joined: Sun Apr 29, 2012 8:35 am
Posts: 2
You need to configure hibernate.jdbc.batch_size property
in hibernate properties. Then save and update your session
object after that use flush.


Top
 Profile  
 
 Post subject: Re: Multiple Transaction Handling in Hibernate
PostPosted: Mon Apr 30, 2012 11:02 am 
Newbie

Joined: Wed Apr 25, 2012 6:52 am
Posts: 2
When i do like that,
if i try to insert a row using save command not not issuing commit statement, row gets inserted but not updated in DB. then if i try to update a row using saveorupdate command and not issuing commit statement, the rows which are inserted previously is going to the backend. i got the insert statement using show sql property.


I need that both insert and update to be updated in database only at the time of commiting.

is it possible to do that?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.