Hi,
I'm having a problem writing code according to the following requirements. Any help would be appreciated.
Requirements:
- I have a parent <--> child mapping and I would like to delete my children when the parent is deleted. So : Cascade = "All".
- When the child meets certain criteria I don't want it to be deleted. So I want to specify a condition in the delete statement or intercept the cascade operation and cancel the delete of child-elements in some cases.
Is this possible? I could use the lifecycle onDelete() method and delete the child-elements manually, but then I'm not using the cascade-power.
Thanks,
Kris
|