zzzprojects / GraphDiff

GraphDiff is a library that allows the automatic update of a detached graph using Entity Framework code first.
https://entityframework-graphdiff.net/overview
MIT License
333 stars 102 forks source link

Adding a unit test to demonstrate and detect issue #116 #143

Closed rwdalpe closed 4 years ago

rwdalpe commented 9 years ago

Create a parent-child model where the child has a FK reference to the parent. Have the parent have an IList collection of children.

EF will automatically put a HashSet in for ICollection, so it must be IList to demonstrate the issue.

The test then uses OwnedCollection to demonstrate multiple adding of children to the parent element. The test will fail accordingly when it expects to get 2 children but instead gets 4.

Referencing issue #116

JonathanMagnan commented 4 years ago

Hello @rwdalpe ,

Thank you for the pull, we have merged it manually (had some conflict with the project structure change) which successfully reproduced the issue.

We will look now at the pull #174 , to check if it fixes it correctly.