Artёm Basov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWEyODMxNjk0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15480?atlOrigin=eyJpIjoiNWEyOD...
) HHH-15480 (
https://hibernate.atlassian.net/browse/HHH-15480?atlOrigin=eyJpIjoiNWEyOD...
) Merging of ModWorkUnit with CollectionChangeWorkUnit followed by another ModWorkUnit
leads to lost modified flags (
https://hibernate.atlassian.net/browse/HHH-15480?atlOrigin=eyJpIjoiNWEyOD...
)
Change By: Artёm Basov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This is, in a sense, a combination of
[
HHH-7918|https://hibernate.atlassian.net/browse/HHH-7918] and
[
HHH-7948|https://hibernate.atlassian.net/browse/HHH-7948].
Steps:
# Tx1: Create {{ListRefEdEntity}}
# Tx2:
## Fetch {{ListRefEdEntity}} created at (1)
## Create and persist {{ListRefIngEntity}} associated with {{ListRefEdEntity}} fetched at
(a)
## Change its data , associate with {{ListRefIngEntity}}
## Flush
## Change its data again
This will lead to 2nd revision of {{ListRefEdEntity}} with {{reffering_mod=false}}
See a [
PR|https://github.com/hibernate/hibernate-orm/pull/5253] for a test case.
We’ve caught this in {{5.4.32}}, but since test case fails on {{ master main }}, I’m
assuming it affects every version since {{5.4.32}}
The way I see the problem is that by discarding both {{CollectionChangeWorkUnit}} and
{{ModWorkUnit#data}} we are relying on the difference between {{oldState}} and
{{newState}}, but debug shows that both states already contain added {{ListRefIngEntity}},
so comparing those gives us {{false}}.
(
https://hibernate.atlassian.net/browse/HHH-15480#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15480#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#100206- sha1:3ac329d )