Click here to Skip to main content
16,004,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Erroe:3034-Problem in mapping fragments starting at lines 4300, 4327: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

What I have tried:

i am trying to update a single table with newly added column but along that table there are some table are also get updated and i also tried by generating a new edmx but problem remains.
Posted
Updated 12-Apr-16 4:31am
v3

Hello,

There might be a Many to Many relationship between the tables, for which the update causes this error in VS. You can create a view might be for the table and use that. That should help. Try this after you have tried resolving by deleting the model from Designer and tried adding again.
Follow here:
sql - Two entities with possibly different keys are mapped to the same row[^]
Another nice article on this:
Entity Framework: Queries involving many to many relationship tables[^]

Thanks
 
Share this answer
 
Comments
Chivillaz 12-Apr-16 10:12am    
i already used the solution mention by you but does not work for me.
I find out the solution by adding a extra column in a junction table which contain only two foreign key.
Example:

Table1: Person
column1:id
column2:name

Table2:Accounts
column1:id
column2:number

Table3:Person_Account
column1:personId
column2:AccountId
column3:id
add extra column id as a primary key in people_Account table and the problem will be solve.

Thanks.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900