Closed Jogai closed 5 years ago
Hello @Jogai ,
Thank for letting us know, it's very appreciated and could help us in a future issue.
I believe we will close this one as I'm not sure how we could correctly handle id = 0. I'm not sure if I'm surprised or not that an insert has been done since an id = 0 usually mean a new entity.
It did surprise me. But like you said, 0 means new entity usually, and that was the case now, so everything worked out in the end.
Description
I found a bug in my usage of GraphDiff, but still want to let you know. I had this:
But since my id was 0 the check is true, thus my entity was inserted this way. Then on calling
The autoincremented id is not read back. This is not an issue for me as I was using the library wrong, but I was surprised graphdiff just does an insert. Maybe if it does its a good idea to re-materialize the object so the behaviour matches EF?
If you want me to provide you with further details I can extend this, but maybe its not worth pursuing. If so, feel free to close the issue.
Further technical details