Hi dears, I'm new in hibernate .I used one- to-many relation in my mapping file although I used cascade = "all-delete-orphan" but actually when I update properties of first table(one side relation) and its objects in other table (many side relation),for example if first mapped class had 3 related object from second mapped class I reduce to 2(so related records in second table should reduced to 2) , but it just make the foreign key(of first table) in deleted record in second table to null and don't delete this record completely.. I thought it would be resolved if I put cascade = "all-delete-orphan" but it did not. what does the problem originate from?
Thanks in advance.
|