Hi
I have a problem in using hibernate versioning.
I have an SimpleFormController that on submit saves twice an object to the db. The problem is that the object version is not updated by hibernate. The version in the db is incremented correctly.
Some example:
Object obj version 1 - > 1st merge -> Object version is still 1 and in the db is 2
2nd merge -> of course throws exception
I know, I could manually increase the version, I could reload the object, but why doesn't hibernate increase even the object version too ?
Is this the normal behavior of Hibernate (to not update the object version on the session) ?
|