I am using the framework entity and I encountered an odd build error.
I create a forum, and I created a table in the database to “ignore”, when people do not like each other, they will ignore someone. A table has two columns, and together they are primary keys.
PK InitiatingUser PK IgnoredUser
When EF displays this table, I get this error:
Error 7 Error 3034: Problem with displaying fragments starting from lines 1467, 1477: Two objects with different keys are displayed on the same line. Make sure that these two display fragments map both ends of the AssociationSet to the appropriate columns.
I opened edmx in an xml editor and switched to breaking lines.
<MappingFragment StoreEntitySet="Ignores"> <ScalarProperty Name="IgnoredUser" ColumnName="IgnoredUser" /> <ScalarProperty Name="InitiatingUser" ColumnName="InitiatingUser" /> </MappingFragment>
I am just starting with EF and I don’t understand what is happening or what might be the problem.
Any help is appreciated.
EDIT Relationships between ignored keys used to have foreign keys that map both the initiating user and the ignored user to the primary key (username) of the user table. That was when I first matched EF with this table. Since then I have removed FK to see if this helps, but it doesn’t.
entity-framework entity-relationship entity-framework-4
Chev
source share