The legacy database I\'ve inherited contains the following tables:
Teams ( TeamId INT PRIMARY KEY, Name VARCHAR(30) ) Players ( PlayerId INT PRIMARY KEY
Just found this: https://nhibernate.jira.com/browse/NH-1272, seems this is a bug in NHibernate, and it is fixed in 2.1.0Alpha1.
I have tried it in NHibernate 2.1.0Alpha2, and it works!
(property-ref should only be in the map tag)