Hibernate version:
2.1.8
I'm trying to figure out cascade="delete-orphan".
I have a set with cascade="delete-orphan" and when I remove something from it and call saveOrUpdate on the owner of the set, it removes the entity but doesn't delete it.
If I set cascade="all-delete-orphan" it does delete it.
I took a look in the code and it seems that the CascadeStyle for "delete-orphan" only passes cascades on ACTION_DELETE. Since I'm not deleting the parent, the cascade never makes it to the orphaned object so the special case code which checks cascadeStyle.hasOrphanDelete never gets called.
So, it seems that cascade "delete-orhpan" is no different than "delete"?
Does that seem right?
-mp
|