My problem is that when I am using bidirectional relationships, I want
to set the child's parent reference from within the parent like so:

public void AddChild(Child c)
{
    c.Parent = this;
    children.Add(c);
}

I can then add the child to the parent like so:

Parent p = (Parent) session.Load(typeof(Parent), id);
Child c = new Child();
p.AddChild(c);

But then c.Parent != p

I understand that this is because of the dynamic proxy / real object
duality as explained by 
http://broloco.blogspot.com/2008/01/nhibernate-identity-map-and-proxies.html

Does anybody have a solution to this?

--~--~---------~--~----~------------~-------~--~----~
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