Hi,

 

is it possible to map to methods instead of properties?

 

I have a Customer class with a method GetOrders typeof ReadOnlyCollection
with backing field _orders typeof IList<Order>.

 

I tried in CustomerMap:

 

HasMany<Order>(Reveal.Member<Customer>("_orders")).KeyColumn("CustomerId").C
ascade.All().Inverse().Not.LazyLoad();

 

But I get an exception when running the insert for a customer containing 1
order.

 

Cannot insert the value NULL into column 'CustomerId', table 'Order'; column
does not allow nulls. INSERT fails.

 

Does mapping methods (or at least their backing fields) not work?

Or am I doing something else wrong?

 

Alex



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