ah... you can have a similar result with many-to-many and <idbag> even without using a class to represent the relation.
2009/6/4 Fabio Maulo <[email protected]> > if Address does not have an inverse relation you can map it with > one-to-many and <set> or <bag>.I'm supposing that Address has a different > lifecycle than Person and Business (the same Address may have a relation > with a Person and with a Business). > > 2009/6/2 Peter <[email protected]> > > >> I want to use one Address table to store the addresses for Person and >> Business objects. The Person and Business objects can have multiple >> addresses. >> >> For example: >> public class Person >> { List<Addresses> Addresses {get; set; } >> >> public class Business >> { List<Addresses> Addresses {get; set; } >> >> The problem is I can't figure out how to map this in NHibernate. I've >> read the book and spent several hours on the forums. Can someone >> point me in the right direction? >> >> >> >> > > > -- > Fabio Maulo > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
