Hi!
I have a database that has a one-to-one relationship modeled between a Person and a Address (that uses person id). However, I cannot find a way to make the map using NHibernate.
My table structure is the following:
PersonTable PersonId PersonName PersonAge AddressTable PersonId CountryName StreetName StateName
And I would like to have something like this as the final class:
PersonClass int Id string Name int Age Address HomeAddress AddressClass string Street string Country string State Person Owner
I tried with HasOne relationship but I couldn´t reuse PersonId as Address Identifier.
Thanks!
Edit: I forgot to mention that I´m using FluentNHibernate so both fluent mapping and XML will be fine.