NHibernate collections: many-to-many relationships
- by Brad Heller
I've got two models, a Product model and a ShoppingCart model. The ShoppingCart model has a collection of products as a property called Products (List). Here is the mapping for my ShoppingCart model.
<class name="MyProject.ShoppingCart, MyProject" table="ShoppingCarts">
<id name="Id" column="Id">
<generator class="native"…