Error creating an association

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Posts: 1
Joined: Thu 08 Apr 2010 15:41

Error creating an association

Post by otelem » Thu 08 Apr 2010 15:54

I'm trying to create a one-to-many association between two tables, Parent and Child.
The Parent's key consists of 2 integer fields.
When manualy creating the association, i get an error saying:

Properties referred by the Dependent Role Children must be a subset of the key of the EntityType TestModel.Child referred to by the Dependent Role in the referential constraint for Relationship TestModel.Assoc1

Can anyone explain this error?


Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 12 Apr 2010 12:04

Does Child Key also have two properties - the same that the Parent one has?
If these properties are different then this should be the reason of the problem.
Alex James gives an explanation at Stackoverflow here: ... -subset-of
Please send me (support * devart * com, subject "EF: Composite FK") the script of your tables if this is not the case.

Post Reply