| Using OPTIMISTIC_FORCE_INCREMENT locks with a version that is generated is not supported. See: https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java#L1618 A HibernateException with should be thrown. I'm not sure why it isn't. For an example of a unit test that creates a property that generated by a trigger, see: https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/test/generated/GeneratedPropertyEntity.hbm.xml |