Problem with a composite key with FNH mapping

25 views
Skip to first unread message

Kalli

unread,
Feb 9, 2012, 1:42:35 PM2/9/12
to Fluent NHibernate
Hi,
I have two tables with one-to-many relation and a problem with FNH
mappings because there is a composite key.
Imagine that tables are Person and Car (is not true but problem is the
same and is easier for me explain you the problem and for you
understand it if there are domain entities best known).

Fields of Person table are: {Id, BirthYear, FullName, ...}
Fields of Car table are: {BirthYear, FullName, Manufacturer}
Do you see?
Although Person table have an Id, who create tblCars use composite
BirthYear+FullName for references a person !!!!

How can I map this relation (with FNH).

Thanks very much!!!!
JC
Reply all
Reply to author
Forward
Message has been deleted
0 new messages