Hoping you will feel my question interesting.
I would lile to use cascade all-delete-orphan on a parent/child relationship with hibernate objects that have been newly instantiated with Data Transfert Objects (DTO), coming from another tier. I build the complete graph of objects to be persisted, with their correct id, version, etc...
But when I delete the parent, hibernate do not propagate the deletion to the childs. I get an integrity constraint violated as it tries to delete the parent record but child records are still found.
Is this the normal behavior ?
Do I have to reload the original persistent object from the database ?
Or is Hibernate clever enough to make the comparison btw my provided collection and the collection maintained by the persistent manager ?
Thanks for your help.
Xav
|