Alexander Schwartz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6267ec4...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzI1NmVlMDgx...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16337?atlOrigin=eyJpIjoiMzI1Nm...
) HHH-16337 (
https://hibernate.atlassian.net/browse/HHH-16337?atlOrigin=eyJpIjoiMzI1Nm...
) EntityCollection is not deleted when replaced (
https://hibernate.atlassian.net/browse/HHH-16337?atlOrigin=eyJpIjoiMzI1Nm...
)
Change By: Alexander Schwartz (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6267ec4...
)
For the Keycloak project, I was able to reproduce the following:
* Run Hibernate 6.2.0.CR3 on Quarkus aka Bytecode enhanced
* Load an entry with a collection (ElementCollection in our case)
* Replace the collection with a new collection
* Run an unrelated query to trigger an autoflush test -> this will initialize a
CollectionEntry with ignore=true, so it will be ignored throughout this session
* commit
Expected result: Only new entries are in the database
Actual Result: Old and new entries are now in the database, als the old entries
haven't been deleted.
This problem doesn’t occur when bytecode enhancement is not used.
Reproducer test case:
[
https://github.com/ahus1/hibernate-test-case-templates/tree/is-HHH-xxxx-e...]
Keycloak issue:
[
https://github.com/keycloak/keycloak/issues/19162|https://github.com/keyc...]
(
https://hibernate.atlassian.net/browse/HHH-16337#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16337#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#100219- sha1:ac3e918 )