I am using Hibernate and a few times had to implement cascading DELETE operation from parent object to its children. I used the following two options.
One option is to expose getChildren() on the parent object, add the child to the returned collection of children and allow Hibernate to cascade DELETE automatically. The disadvantage of this option is that getChildren() collection needs to be exposed even though it's only used to support Hibernate cascading.
Another option is to look up and delete children manually in ParentDao.delete(parent). The disadvantage of this option is more custom code. However, this option may perform better if it uses batch delete statements.
What approach do you mostly use? Do you see other pros and cons?