Florian Kern (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee102c...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYjdlM2VkN2Uy...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14102?atlOrigin=eyJpIjoiYjdlM2...
) HHH-14102 (
https://hibernate.atlassian.net/browse/HHH-14102?atlOrigin=eyJpIjoiYjdlM2...
) orphanRemoval behaviour differ from lazy to eager loading (
https://hibernate.atlassian.net/browse/HHH-14102?atlOrigin=eyJpIjoiYjdlM2...
)
Issue Type: Bug Affects Versions: 5.4.12, 5.4.17 Assignee: Unassigned Components:
hibernate-core, hibernate-entitymanager Created: 09/Jul/2020 04:11 AM Priority: Critical
Reporter: Florian Kern (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee102c...
)
In a oneToMany relation you have different behaviours if you removing a children from the
collection.
If you remove a children from a fetched collection, the children wouldnt be removed from
the database.
If your collection is lazy fetched, the children would be deleted.
See attached Testcase for example. Execute via
mvn test
(
https://hibernate.atlassian.net/browse/HHH-14102#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14102#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#100133- sha1:bf400b0 )