ORM support for compound primary keys
Asked Answered
D

1

1

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)

Dedicate answered 20/10, 2008 at 11:28 Comment(0)
I
3

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>
...
Indiscrete answered 20/10, 2008 at 11:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.