NHibernate version: 2.0.0.3001
In NHibernate docs
http://nhforge.org/doc/nh/en/#example-parentchild just before section 18.4 there is the following line:
Now, in our case, a Child can't really exist without its parent. So if we remove a Child from the collection, we really do want it to be deleted. For this, we must use cascade="all-delete-orphan".
I have tried to use this mapping of all-delete-orphan but I keep on getting NULL VIOLATION exceptions.
As I understand this happen due to the fact that removing a child entity from a parent entities' collection only remove the link between them, not removing the child entity.
But the whole point of all-delete-orphan is to remove the orphan child, doesn't it?
Please help me figure this out.
Ido.