Many-to-many relationship left and right keys flipped after Entity Framework 5 upgrade

前端 未结 2 1082
眼角桃花
眼角桃花 2020-12-30 07:07

I have some code that saves a many to many relationship in code. It was working fine with Entity Framework 4.1 but after updating to Entity Framework 5, it\'s failing.

2条回答
  •  别那么骄傲
    2020-12-30 07:25

    I can confirm this is a bug in EF5, although I'm still not sure how it worked in 4.3.1.

    The problem is that we are not correctly associating the LeftKey/RightKey calls with their corresponding navigation properties.

    I will file an EF6 bug over on our CodePlex project site.

    To workaround, I think you will need to either:

    1. Configure the association from one side only. Or,
    2. Switch the LeftKey/RightKey columns names to be the same in both configurations.

    Sorry for the inconvenience.

    UPDATE: Here is the bug.

提交回复
热议问题