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
When deleting parent entity hibernate wants to delete orphan collections.
When trying to delete
childEntities
, foreign key is searched insideChildEntityWrapper
instead of insideParentEntity
.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