NHibernate - Mapping a String Foreign Key

后端 未结 4 468
天涯浪人
天涯浪人 2021-01-19 12:48

The legacy database I\'ve inherited contains the following tables:

Teams ( 
 TeamId INT PRIMARY KEY,
 Name VARCHAR(30)
)

Players (
 PlayerId INT PRIMARY KEY         


        
4条回答
  •  悲&欢浪女
    2021-01-19 13:34

    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)

提交回复
热议问题