OrphanRemoval does not work with embeddables when deleting entity

Description

 

When deleting parent entity hibernate wants to delete orphan collections.
When trying to delete childEntities, foreign key is searched inside ChildEntityWrapper instead of inside ParentEntity.

Problems was noticed in Hibernate 6.1.5.Final with Spring Boot 3.0.0, In Hibernate 5 function worked correctly. (I was migrating my application to new Spring Boot 3.0.0)

owner should be ParentEntity

To reproduce problem use attached example application, execute posting and then deleting endpoint

Attachments

4

Activity

Show:

Marco Belladelli December 23, 2022 at 1:48 PM

Thanks for reporting the issue and providing a reproducer!

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created December 14, 2022 at 12:19 PM
Updated August 4, 2023 at 1:53 PM
Resolved December 23, 2022 at 12:23 PM