You don't mention what problems you encounter but... Try to declare your collection as IList<ClientOrderProduct> instead.
If you've not already read it, have a look at http://nhforge.org/doc/nh/en/index.html#collections On Apr 7, 5:36 am, Brad <[email protected]> wrote: > I am new to nHibernate and I am getting very frustrated with the > Mappings. The issue at hand is dealing with classes that contain > list<T>. > > For example I have a clients that make orders. The orders contain > products. So I make a class for Clients, Client Orders, Products, then > a Class to hold the Clients ordered products. > > Classes: > > public class ClientOrder > { > public int ClientOrderId { get; set; } > public Client Client { get; set; } > public DateTime OrderDate { get; set; } > public Party Party { get; set; } > public List<ClientOrderProduct> OrderProducts { get; set; } > > } > > public class ClientOrderProduct > { > public Product Product { get; set; } > public int OrderAmount { get; set; } > public decimal Price { get; set; } > } > > How would the List<ClientOrderProduct> be created in the > ClientOrder.hbm.xml file? I've seen examples for list, bag, and set > but none seem to fit. -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
