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

Low-level state changes #1247

Closed
ajcvickers opened this issue Dec 8, 2014 · 2 comments
Closed

Low-level state changes #1247

ajcvickers opened this issue Dec 8, 2014 · 2 comments

Comments

@ajcvickers
Copy link
Member

If you call Remove for an Added entity its state gets set to Detached. See #251 and #265. However, the same is true for setting the entity's state to Deleted--it actually becomes Detached. Should setting the state honor the state passed, while the Remove method does something different? Or is it better to be consistent, in which case maybe the SetState method should be called ChangeState and documented appropriately? Also, see #1246 since this could result in setting the state to Unchanged but getting Modified.

@rowanmiller rowanmiller added this to the 7.0.0 milestone Dec 8, 2014
ajcvickers added a commit that referenced this issue Dec 10, 2014
Issue #1247. Calling Remove for and Added entity still resulted in the Detached (Unknown) state, but now setting the state to Deleted does result in the Deleted state.

The only place where setting a state may result in a different state is when attempting to set to Unchanged with an FK that is inconsistent. See #1246.
@ajcvickers
Copy link
Member Author

The fix for this issue does not include the case where setting to Unchanged could ultimately result in a Modified state if the FK is inconsistent with the graph. See Issue #1246. Sending this back to triage to check that this is acceptable.

@ajcvickers ajcvickers removed the pri0 label Dec 10, 2014
ajcvickers added a commit that referenced this issue Dec 10, 2014
Issue #1247. Calling Remove for and Added entity still resulted in the Detached (Unknown) state, but now setting the state to Deleted does result in the Deleted state.

The only place where setting a state may result in a different state is when attempting to set to Unchanged with an FK that is inconsistent. See #1246.
@ajcvickers ajcvickers removed this from the 7.0.0 milestone Jan 5, 2015
@rowanmiller
Copy link
Contributor

Happy with the behavior we have

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants