ORM支持复合主键

时间:2008-10-20 11:28:29

标签: .net sql orm primary-key compound-key

我已经读过复合主键confuse the hell out of typical ORM code generators。哪些ORM最适合复合PK,哪些可以避免? (我对.NET特别感兴趣)

1 个答案:

答案 0 :(得分:3)

我正在使用复合键成功使用NHibernate。

<class name="UserProfileField" table="UserProfileFields">
    <composite-id>
        <key-many-to-one name="Parent" column="UserId" lazy="false"/>
        <key-property name="FieldName"/>
    </composite-id>
...
相关问题