I've read that compound primary keys will confuse the hell out of typical ORM code generators. Which ORMs work best with compound PKs and which to avoid? (I've a particular interest in .NET)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I'm using NHibernate successfully with compound keys.
<class name="UserProfileField" table="UserProfileFields">
<composite-id>
<key-many-to-one name="Parent" column="UserId" lazy="false"/>
<key-property name="FieldName"/>
</composite-id>
...