ObjectDB ObjectDB

Cascade.ALL with LAZY fetchtype does not clean up all references on remove

#1

Hello,

I have a tree of entity classes that reference others using Cascade.ALL in combination with FetchType.LAZY. If I now delete a root entity using EntityManager.remove all leaf nodes will not be deleted. This only applies to the leaf nodes. If I add an additional the behaviour changes so that these new leafes will not be deleted.
I created a small test case which can be downloaded at http://www.objectdb.com/database/support/665

Please start the Tester.main() with the generate() method first. This creates an initial database set. Then uncomment the method delete() in and comment the generate() method and run again. You will notice that all leaf instances of OpeningHours remain in the database. If you remove the FetchType everything works.

Best regards
Markus

edit
delete
#2

Thank you for this report. Please try build 2.7.2_09.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.