The legacy database I\'ve inherited contains the following tables:
Teams (
TeamId INT PRIMARY KEY,
Name VARCHAR(30)
)
Players (
PlayerId INT PRIMARY KEY
Now I'm not 100% sure if this will work but have you tried a many-to-one mapping relationship?
Maybe something like this:
I believe that should work, according to the NHibernate manual property-ref is an attribute that is useed for mapping legacy data where a foreign key refers to a unique key of the associated table other than the primary key. This sounds like the situation you find yourself in.