Not to delete child record on deleting parent table record
I am little bit newbie in Hibernate and DBMS and stuck on a problem. I have two table. One is A
and second is B
. There is Many-to-One relationship between these two tables. Now on removing one record from table A
I do not want 开发者_Python百科to delete the record from table B
. What type of cascading strategy should I apply.
Please help.
Here's what Hibernate manual says.
Based on what you wrote I think you should use cascade="persist,merge,save-update"
精彩评论