OK I got the Idea, but suppose that middle table is not a entity, suppose it is just a middle table for many-to-many relationship, how would you handle it in a XML mapping file?
Visar Thank you for your replies On Mar 30, 1:49 pm, Kim Johansson <kim.johans...@industritorget.se> wrote: > That's not a many-many relation... That's two one-many relations. The middle > table needs to represented as an entity. > > Med vänliga hälsningar, > Kim Johansson > Industritorget Sweden AB > Söndrumsvägen 29 > 302 39 Halmstad > tel: 035 - 260 32 00 > fax: 035 - 12 24 83 > epost: kim.johans...@industritorget.se > webb:http://www.industritorget.se > > > > -----Original Message----- > From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of > Visar Uruqi > Sent: den 30 mars 2010 12:40 > To: nhusers > Subject: [nhusers] Many to Many with lots of properties in the middle table > > This is the hardest thing I believe in NHibernate, > The many to many relationship when the middle table has properties > beside the primary keys. Help me to map this example: > > Here in this link you will find an image of the schema that I want to > map, its 3 tables just for illustrationhttp://treshja.com/files/hotel.png > > how do you map this in Nhibernate using XML (not ActiveRecord)? > > Visar > > P.S. Thank you for your contribution, without you I would not be able > to use Nhibernate > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to nhus...@googlegroups.com. > To unsubscribe from this group, send email to > nhusers+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhus...@googlegroups.com. To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.