Repository navigation
Make owned entities take their state from owner when attaching - #8986
Merged
Merged
Conversation
anpete
reviewed
Jun 27, 2017
| // ReSharper disable once CheckForReferenceEqualityInstead.2 | ||
| if (Equals(keyValue.Key.ClrType, type) | ||
| && keyValue.Value.TryGetValue(entity, out entry)) | ||
| && keyValue.Value.TryGetValue(entity, out InternalEntityEntry foundEntry)) |
anpete
approved these changes
Jun 27, 2017
ajcvickers
force-pushed
the
SweetDreamsAreMadeOfThis0627
branch
from
July 1, 2017 02:12
e7a0b38 to
5c39893
Compare
Contributor
Author
|
@AndriySvyryd @anpete Updated this based on triage discussion/decisions. |
AndriySvyryd
approved these changes
Jul 5, 2017
…ching Issue #7985 Moved key propagation inside state manager for keys that are unknown--typically shadow keys on attached entities. This prevents common cases of key not set for identifying relationships. Also added special behavior used by Attach that will take the entity state from the principal. If graph attach comes from DetectChanges, then state is still Added--because it wasn't there and now it is.
ajcvickers
force-pushed
the
SweetDreamsAreMadeOfThis0627
branch
from
July 5, 2017 21:32
5c39893 to
64a499b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #7985
Moved key propagation inside state manager for keys that are unknown--typically shadow keys on attached entities. This prevents common cases of key not set for identifying relationships. Also added special behavior used by Attach that will take the entity state from the principal. If graph attach comes from DetectChanges, then state is still Added--because it wasn't there and now it is.