-->
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.  [ 1 post ] 
Author Message
 Post subject: hibernate 3.1 and oracle batch update prepared statements
PostPosted: Fri Apr 14, 2006 2:39 am 
Newbie

Joined: Tue Feb 14, 2006 2:43 am
Posts: 5
Hi,

We are using Oracle 10 with Hibernate 3.1

When we use batch updates, the Oracle driver returns allways -2, which Hibernate thinks is ok, being the database updated correctly.

In other words, when an object is updated in memory, in the meantime the row is deleted in the database table, Hibernate thinks this update is ok, since '-2' is considered to be unknown and ok. (BatchingBatcher.checkRowCount() )

If we set the batch size to 0 (hibernate.jdbc.batch_size) the error is detected, meaning 0 rows updated which causes an exception.
Of course, this will have a big impact on performance, so this is not an option.


=> How can we be sure that the update/insert/delete was ok if the batch returns -2 ?




Oracle website: batch updates => returns allways -2
http://download-west.oracle.com/docs/cd ... m#i1056232


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

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.