This is probably a daft question but I keep seeing contradictory info
on the internet and even in the nhib book.
If I have an Order with a IList<OrderLine> OrderLines {get; set;}
property and have the following in my mapping for Order:
            HasMany(x => x.OrderLines)
                .AsList()
                .Cascade.All()
                .Inverse();

Do I actually have to have the corresponding Order property on the
order line, have the Reference in the mapping in the OrderLineMapping
and code: orderline.Order = this; OrderLines.Add(orderLine) when
adding an order line?
If I do not do all this my foreign key field in OrderLine table is
always null.

It makes sense that you would have to do this, but I see so many
examples on the net where people seem to be implying you only need to
do the bi-directional stuff if you actually want to navigate from an
OrderLine to an Order...

A simple yes\no would be great!!!! Thanks everyone.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to