Hibernate Team |
|
Joined: Mon Aug 25, 2003 9:11 pm Posts: 4592 Location: Switzerland
|
Why should it delete the other entity? You only dereferenced it from the collection, that doesn't mean it has to be deleted. It could be referenced by another entity. You have to explicitely delete() it after taking it out of the collection. (Read the documentation or HiA again and try to think about "entity" and "value type".)
You are probably looking for cascade="all-delete-orhpan", but you should only use this shortcut if you understand object lifecycle and sahred references completely.
_________________ JAVA PERSISTENCE WITH HIBERNATE http://jpwh.org Get the book, training, and consulting for your Hibernate team.
|
|