Hello,

I have a bidirectionnal association between Parent - Child with helper
methods in Parent class to Add and Remove childs objects (setting the
Parent property of the child added or removed).

If I  remove a child in the Session, I got the expected behavior ie
NULL column :

var parentToBeUpdated = Session.Get<Parent>(id);
var child= parentToBeUpdated .Points[0];
contactToBeUpdated.RemoveChild(child); //child got its parent column
set to NULL


But if I use a child object detached ie loaded in a previous session,
there's no update done

var parentToBeUpdated = Session.Get<Parent>(id);
var child = fromn previous session
parentToBeUpdated .RemoveChild(child);

I override the Equals and GetHashCode methods and the child is removed
from the collection but the DB is not updated.

Matthieu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to