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)
+3
A:
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>
...
deepcode.co.uk
2008-10-20 11:34:46
Agreed that NHibernate works well with compound keys.
Vincent Ramdhanie
2008-10-20 20:43:47