-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
API docs for DbContext.Update etc. have incorrect info about state of related entities #6739
Comments
This behaviour also seems to apply to the |
OK- I have just found #4424 which suggests that the behaviour I have reported is by design (despite the summary of the methods in source code).
I guess that leaves one point of confusion in my mind: what exactly does |
Notes for triage: The API docs are wrong, I will fix this.
|
I agree that it is confusing. IsKeySet suggests to me that a deliberate action took place at some point to set a valid value. Perhaps the property can be wrapped in a more aptly named method. |
Discussed at length and concluded that we want to leave |
Steps to reproduce
The issue
I would expect, based on the summary for the Update method that the ChangeTracker should contain two entries as a result of the above code, both in the
Modified
state. I would also expect aDbUpdateException
to be thrown when EF attempts to update a book with no key value provided. However, the Book entry is in theAdded
state, which, while it makes sense, does not conform to the documentation for the method.I would also expect the
IsKeySet
property to betrue
for the author, butfalse
for the book. It istrue
for both.Further technical details
EF Core version: 1.0.1
The text was updated successfully, but these errors were encountered: