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.