views:

195

answers:

1

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

+1  A: 

I've managed to solve the issue. Apparently the problem was that I wasn't using Association and Include attributes.

VexXtreme