Hibernate version: 3.2.1
We're running a Spring-based web application that uses Hibernate with Spring transaction management.
So far, everything worked fine, but after we updated our Hibernate version from 3.2.0 to 3.2.1, a weird bug was introduced, and certain changes to objects weren't persisted anymore.
Inside a transaction, we iterate over a number of Job objects that change certain model objects' properties, including a UserType we wrote for convienience. After each iteration, we call flush() on Spring's HibernateTemplate in order to prevent rare cases of inconsistencies that occured when two jobs handled the same object operations, thereby flushing the Hibernate session. We can see in the log files that our UserType's nullSafeSet() method is called at this point.
With Hibernate 3.2.0, all changes were persisted after each flush() call and at the end of the transaction.
With Hibernate 3.2.1, only the changes up to the first flush() call are persisted, and everything that occurs in the other iterations is not persisted at all! We can see in the log files that the flush() method is correctly called, but the UserType's nullSafeSet() isn't.
If we omit the flush() calls, all changes are persisted correctly at the end of the transaction, but we need those calls to prevent the possibility of a rare bug in our application.
I browsed the changelogs, but I couldn't find a reason why Hibernate behaves differently in this setup after the update to 3.2.1.
Any suggestions would be highly appreciated. Thanks in advance.
|