Matthieu Rickly (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiN2I4YWI3Mjg4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16586?atlOrigin=eyJpIjoiN2I4YW...
) HHH-16586 (
https://hibernate.atlassian.net/browse/HHH-16586?atlOrigin=eyJpIjoiN2I4YW...
) When merging a persisted entity with a null Version, Hibernate treats entity as
transient instead of throwing (
https://hibernate.atlassian.net/browse/HHH-16586?atlOrigin=eyJpIjoiN2I4YW...
)
Change By: Matthieu Rickly (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
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.
(
https://hibernate.atlassian.net/browse/HHH-16586#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16586#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:4a1ccf9 )