h1. Observed behaviour
* Entity has a Version field of type null. * New instance gets persisted. * Instance is modified and merge is attempted with a null version field. * Hibernate does not complain about missing version. Instead the entity is treated as transient, although it exists in the database , leading to unexpected results .
h1. Expected behaviour
* When attempting to merge a persisted and detached entity with a null version, Hibernate either throws an exception or fetches the latest version from the database. |
|