Since you've got an actual class representing your join table, it's not a many to many. You can use a many-to-many if you drop the ProductInOrder class, and instead use an IDictionary<Product,int> on the Order side, with an entity key on the dictionary.
Otherwise you map ProductInOrder with references() back to Order and Product. Order and product each have a HasMany() to ProductInOrder. On Wed, Feb 17, 2010 at 9:03 AM, Del Brocco Andrea <a.delbro...@gmail.com>wrote: > Hi, the sample scenario is this: > > table Order > with > id, OrderDesc, > > > table Product > with id, DescProduct > > > table OrderDetail > with idOrder ,idProduct, quantity > > > objects > > > object Order > { > idOrder, > DescOrder, > ICollection<ProductInOrder> Details > } > > object ProductInOrder > { > idProduct, > DescProduct > quantityAB > } > > Ill try to use manytomany or join and different models but i'm not be > able to recostruct the behaviour > (distinct objects and collections and so on, productbase mapped to > product and a subclass productorder with a join, etc) > > The sample is not my real problem but the situation is the same, i > want to know how i can map or rearrange domain for this situation. > > -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To post to this group, send email to fluent-nhibern...@googlegroups.com. > To unsubscribe from this group, send email to > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/fluent-nhibernate?hl=en. > > -- - Hudson http://www.bestguesstheory.com http://twitter.com/HudsonAkridge -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.