You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When two entity types share the same table, then deleting an instance and inserting a new instance into the same row is combined into an update for the row. This makes sense for table sharing, but we also started doing this for entities mapped to different tables. This causes problems when:
I'm not sure what we decided any more, but assuming we support optional dependents for table sharing (do we?), would it still make sense to go through the motions of doing delete and insert like we'd do for non-table-sharing? Basically I'd expect Remove/Add to perform exactly the same regardless of whether there's a SaveChanges in between - except where doing that would raise an exception (i.e. non-optional table sharing).
But I'd assume that if we support optional table sharing, it should already be possible to delete the dependent without deleting the principal no? And if so, there's no reason to merge the delete/add for that case...
When two entity types share the same table, then deleting an instance and inserting a new instance into the same row is combined into an update for the row. This makes sense for table sharing, but we also started doing this for entities mapped to different tables. This causes problems when:
Therefore, we should stop doing this except where needed for table sharing.
The text was updated successfully, but these errors were encountered: