Tuesday, March 2, 2010

Programmer - NHibernate mapping of one class containing 2 references to the same entity

Programmer Question

I have a person class, then have a family class where I have a property Father and a property Mother of type Person.



I have a database table for Person and a Family table containing FamilyId, FatherId, MotherId where FatherId and MotherId is foreign keys for PersonId in Person table.



How would you go about to map this in NHibernate?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails