Hello friends,
We have a problem with how the batch processing works in one scenerio and would like to disable it. Here is the issue -
1. We begin a transaction.
2. We insert 2 records in table A.
3. Now we run a query on table A (plus few others in a join) that should return the sum of some records in table A including the 2 records entered in step 2.
4. Now with that sum, we try to insert a 3rd record in table A.
5. commit.
The problem is, the INSERT statements are fired only when the "commit" is executed and so the select query in step 3 can't find those 2 and returns incorrect result.
In hibernate.cfg.xml, we have this -
<property name="hibernate.jdbc.batch_size">0</property>
We also tried to change the value from 0 to 1, but it seems, the batch processing is always enabled and ignores the batch size.
Hibernate version: 3.2
Name and version of the database you are using: Oracle 10g
Is there a way we can disable the batch processing in this case ? Any help would be greatly appreciated.
Thanks.
|