Hibernate version: 2.1.6
It looks like that hibernate does not rollback version of object when it fails...
I am using optimistic-lock="version" class mapping strategy to determine if instance is new. What happens is that if .commit() fails and I do tx.rollback() version values are not reverted back, so I can not use these instances anymore, because version information for them is incorrect!!!
Is this bug or feature???
Documentation does not say that instance become invalid when tx.commit() fails, it just says that session becomes invalid and it is necessary to do rollback()...
Rihards
|