views:

15

answers:

1

I want to delete record(s) from child table after calling save/update on parent using hibernate

+1  A: 

Using an interceptor or callbacks methods would probably be the best place to implement this. I'm not sure if you are using straight Hibernate or JPA so I'll provide both links:

Basically, the idea would be to set the child collection to null during pre-update.

Pascal Thivent