Entity Framework table for hierarchy error 3034

I have an Entity Framework model using a table for each 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 many-to-many relationships go through the join table.

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

Error 3034: a problem when displaying fragments starting from lines 1074, 1082: two objects with possibly different keys are displayed on the same line. Make sure that these two display fragments map both ends of the AssociationSet into the appropriate columns.

Here is an image of the relevant parts of the model (LabelImages and PresetImages associations - those that give problems):

alt text http://img810.imageshack.us/img810/9026/model1.png

+5
source share
1 answer

A little late, but anyway:

This is not realistic if you are referring to a base database. The Entity structure will create one join table for the relationship between the image table and the product table, while you really need two different ones.

. , . , . OfType.

+1

All Articles