can any one provide me full 2 mapping file which implements cascade delete.
measn if A contasis a set of B then when A is deleted B shold automatically be deleted.
can any one provide me full 2 mapping file which implements cascade delete. measn
Share
You only need 1 mapping file: the one of the parent object. E.g. this example from Hibernate in action
The “cascade” parameter does the job. If you only want the cascading delete, then you should use cascade=”delete”. Other options are “all-delete-orphan” and “delete-orphan”. Check out the Hibernate documentation for more info.