How to delete child table records during the update of parent table using Hibernate
- by Harsha
I have a Parent Table A and child tables B,C with many to one relations.
Lets say I have data like, for primary key 1 in parent table A I have 3 rows in child table B and 4 rows in child table C.
Now if I want to delete the rows of the child table during an update of the parent table(that means Now, I want to update the table only with one row in each child tables and delete the other rows in them) then how to handle this scenario in hibernate?