How to delete child table records during the update of parent table using Hibernate

Posted by Harsha on Stack Overflow See other posts from Stack Overflow or by Harsha
Published on 2010-06-14T19:00:59Z Indexed on 2010/06/14 19:02 UTC
Read the original article Hit count: 170

Filed under:

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?

© Stack Overflow or respective owner

Related posts about hibernate