The example I gave is one that I found here: http://ayende.com/Blog/archive/2007/04/24/Multi-Table-Entities-in-NHibernate.aspx<http://ayende.com/Blog/archive/2007/04/24/Multi-Table-Entities-in-NHibernate.aspx>It's a good example, but the tables that we have in our database are more complex than this example and to get all the info for a single person we must join 5 or 6 tables. In the example the person_id is the primary key for the person table and the address_id is a foreign key that relates back to the person_id. What I would like to do is specify which table and column to join on. Let's say that the person table had an address_id to relate to the address table. So instead of the address.address_id relating to the person.person_id, address.address_id would relate to person.address_id. I'm not sure nhibernate can handle this situation.
On Fri, Jun 26, 2009 at 3:13 PM, Fabio Maulo <[email protected]> wrote: > 2009/6/26 ike bailey <[email protected]> > >> This example shows how to map multiple tables, but it assumes that the >> address_id maps to the person_id. I would like to map the address_id of the >> address table to the address_id of the person table > > > > Which is the name of the pattern ? > I don't know it. > > Probably you are looking for a one-to-one relation. > > -- > Fabio Maulo > > > > > -- Isaac Bailey --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
