Delete is not cascaded for enhanced entities, resulting in foreign key constraint error in database. The same code works if entities are not enhanced. I will attach the test case.
I left 5.4.1 as a fix version, since this is actually a different bug than described by HHH-13129.
I resolved it as a duplicate of HHH-13129, because the commit that fixes this issue has a message that mentions only. It should have mentioned both and HHH-11807.
Former user January 16, 2019 at 8:37 PM
, thanks for doing that! There are already tests for cascade-delete in HHH-13129, so I think we're good.
Guillaume Smet January 16, 2019 at 11:00 AM
as it's assigned to you, I let you decide if we need to add an additional test case or if we're good with the fix and test case in HHH-13129.
With my updated test case, the issue is fixed with the latest snapshot.
Guillaume Smet January 16, 2019 at 10:55 AM
I deployed a local snapshot and I can confirm the issue is fixed in master.
Guillaume Smet January 16, 2019 at 10:44 AM
The test case does not work properly: the properties files should be in src/test/resources and the entity should be in src/main/java otherwise they are not enhanced.
Delete is not cascaded for enhanced entities, resulting in foreign key constraint error in database. The same code works if entities are not enhanced. I will attach the test case.