Model it as two one-to-many relationship. Taking your table model into account, I would even go so far as to say that for all practical purposes you don't even have a many-to-many relationship. Both Room, Reservation, and Guest seems like significant, standalone, concepts (entities).
/Oskar 2010/3/30 Visar Uruqi <[email protected]>: > 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 illustration > http://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 [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. > > -- 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.
