Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChangeTracker does not eliminate unnecessary changes #251

Closed
natemcmaster opened this issue May 22, 2014 · 1 comment
Closed

ChangeTracker does not eliminate unnecessary changes #251

natemcmaster opened this issue May 22, 2014 · 1 comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@natemcmaster
Copy link
Contributor

When add and remove are in the same unit of work, the change tracker still submits a remove StateEntry upon .SaveChanges().

Is this a bug or intentional behavior?

Example:

context.Items.Add(item); // add
item.Count = 12435; // modify
context.Items.Remove(item); // remove

context.SaveChanges(); // requests removal
@ajcvickers
Copy link
Member

This is a bug given how the current EF works and how I expect it to work in EF7. That being said, the ability to detect and respond to changes in EF7 is still pretty basic right now so it might be a while before it gets fixed unless it is blocking.

@rowanmiller rowanmiller added the bug label Jul 7, 2014
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 15, 2022
@ajcvickers ajcvickers modified the milestones: 1.0.0-alpha2, 1.0.0 Oct 15, 2022
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

3 participants