Fluent NHibernate Automapping with RIA services

Posted by VexXtreme on Stack Overflow See other posts from Stack Overflow or by VexXtreme
Published on 2010-04-15T11:34:01Z Indexed on 2010/04/15 16:43 UTC
Read the original article Hit count: 909

Hi guys

I've encountered a slight problem recently, or rather a lack of understanding of how NHibernate automapping works with RIA data services.

Namely, I don't understand how to use Association and Include attributes. For instance, I've created two tables in my database and corresponding classes (that NHibernate correctly fills). The problem is, RIA doesn't generate properties (collections) bound by foreign key to other tables, on the client side, although I've defined them in my classes in my domain model... it generates just properties that belong to their own class, on the client side.

I assume that these attributes aren't necessary since NHibernate automapper is supposed to fill those collections on it's own... I'm quite confused as to how this works. And I don't understand why RIA simply skips properties such as

public virtual IList<Medication> Medications{ get; set; }

during autogeneration.

Any input is appreciated

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about fluent-nhibernate