Beginner |
|
Joined: Fri Nov 24, 2006 10:33 am Posts: 42
|
Sorry if this is a daft question but it's late and my brain is mush right now.
I've got a one to many relationship. When I remove one of the child records from my parent's collection, I *dont* want the orphan to be deleted. I want the child to stay in the database, but with the foreign key to the parent (which is nullable) set to null (or zero or anything that doesn't point back to the parent).
On the collection (bag) I've got cascade='save-update' rather than 'delete-orphan'.
I thought that would do it.
Or am I using one-to-many wrong and I should be using a many-tomany for this?
Thanks
|
|