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