Joined: Fri Jan 09, 2004 9:55 am Posts: 10 Location: Rutland, UK
|
Dear all
I have an object Contact which can have as many ContactNumbers as required. This is set up as a bag with a many-to-many relationship.
I can add as many ContactNumber objects to my Contact as I want and it works fine, and when I delete a Contact all child ContactNumber objects (and their references in the mapping table) are also deleted in the cascade.
If, however, I remove some of the ContactNumber objects from the Contact which I then pass it to the saveOrUpdate method it only deletes the references in the mapping table, not the actual contact numbers.
I have tried changing the cascade type from all to all-delete-orphan but without result - hope more than anything!
Any help/advice would be very welcome.
Nick.
|
|