| I see this on 4.3.11 and also on the latest 5.0.6 version (hoped that would fix the issue). In our case we are using the Annotations style
@Version
@Generated(GenerationTime.ALWAYS)
@Column(name = "VERSION_NBR", updatable = false, insertable = false)
Looks like Hibernate is ignoring the GenerationTime and always bumping the version number (see below I passed in the current version 5 and bumps it to 6 before the update call.
2015-12-17 10:22:49.527 TRACE 5552 --- [ tomcat-http--5] o.hibernate.engine.internal.Versioning : Incrementing: 5 to 6
Our only option for now is to remove Version and lose optimistic locking until this is fixed. |