Hi,
I have two tables with a parent-child (one-many) relationship, and I have enabled cascade-delete on the child's table as a referential constraint.
Over at hibernate's end, in the parent's class mapping doc, I've declared
Quote:
cascade="all-delete-orphan"
attribute
on the set of child class.
The interesting thing I've observed is that when I perform a session.delete() on the parent class object, hibernate will generate a delete statement for the child record as well. To prevent hibernate for issuing this redundant delete statement (since the child record would have been cascade deleted), I have to remove the above attribute. Is there a way to declare the above and yet have hibernate not issue the extra delete statement?
Thanks