Table per hierarchy error 3034 RRS feed

  • Question

  • I have an Entity Framework model using table per hierarchy. The base class is abstract and there are two derived classes.

    I want to create associations between these two derived classes and another class. These are many-to-many relations so go through a joining table.

    Adding the first association is ok, but when I add the second i get this error:

    Error 3034: Problem in mapping fragments starting at lines 1074, 1082:Two entities with possibly different keys are mapped to the same row. Ensure these two mapping fragments map both ends of the AssociationSet to the corresponding columns.

    Heres an image of relevant parts of the model (the LabelImages and PresetImages associations are the ones giving the trouble):

    alt text

    I can also post parts of the EDMX if that will help.

    Tuesday, August 17, 2010 4:16 AM