| Piotr, I tried running your test using `mvn test`, but got: [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ hibernate-optimisticlogic-bug — [INFO] No tests to run. Also, your pom.xml shows hibernate ORM version 4.3.11.Final. Please make corrections and use 5.0.7-SNAPSHOT. We really need something that does not use Spring. A better alternative is to provide a pull request for a unit test to org.hibernate.test.version. A similar test using hbm.xml mappings with a generated version is: org.hibernate.test.version.sybase.SybaseTimestampVersioningTest. If you have access to a Sybase DB, then please update SybaseTimestampVersioningTest to reproduce your issue. If you want to use a trigger to generate your version instead, then add you can add your trigger to your mapping file similar to how is done in org/hibernate/test/generated/GeneratedPropertyEntity.hbm.xml Mark Diskin, it would help a lot if you could also provide a test that reproduces this issue using annotations. A pull request that adds a unit test to org.hibernate.test.version that uses annotations. |