refactorthis/GraphDiff — pull request #85 by rho24 (2014-09-19 16:53:35+00:00)
Title: Added complex types tests and fixed inserting complex types

Hi
I ran into a bug when adding a new child to an owned collection, where the child type has a complex type as a property. The underlying problem is when calling DbPropertyValues.SetValues() during the ChangeTracker.UpdateItem() method.

Entity framework throws an exception when setting a complex type property if its currently set to null (even though we're setting it to a non null value).

I've included a set of tests and a fix in ChangeTracker, 3 of the tests fail if the fix is not there so feel free to see it for yourself.

Let me know what you think about the change, happy to put in more work if the fix is in the wrong place or the tests aren't to your liking.

Cheers
Richard