Bi-directional associations

16 views
Skip to first unread message

Peter Morris

unread,
Mar 28, 2012, 11:45:54 AM3/28/12
to nhusers
Is there a way to get NH to automatically set the single-end of an
association when inserting a child into a many end of a bi-directional
association? Or perhaps an extension?

e.g.

purchaseOrder1.Lines.Add(purchaseOrderLine1); would also set
purchaseOrderLine1.PurchaseOrder;
purchaseOrderLine1.PurchaseOrder = purchaseOrder1; would also insert
into purchaseOrder1.Lines;

Fabio Maulo

unread,
Apr 7, 2012, 5:37:42 PM4/7/12
to nhu...@googlegroups.com
That is part of your entity and NH have nothing to do with your own code... it is just an ORM
Reply all
Reply to author
Forward
0 new messages