This is, in a sense, a combination of HHH-7918 and 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}} created after Tx2 with {{reffering_mod=false}}
See a [PR|https://github.com/hibernate/hibernate-orm/pull/5253] for a test case
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}}. |
|