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

[5.0.3] Set relationship snapshot correctly for skip navigations #23815

Merged
merged 3 commits into from
Jan 13, 2021

Conversation

ajcvickers
Copy link
Member

@ajcvickers ajcvickers commented Jan 5, 2021

Fixes #23787

Description

If skip navigations are detected to have values on a newly tracked entities, then these values need to be added to the relationship snapshot so that DetectChanges does not re-detect them. This is not happening for one path with store-generated keys.

Customer Impact

In most cases this has no impact, as DetectChanges catches up when it first runs. However, if changes are made to the graph before this happens, and if the entities have store-generated keys, then this can result in a change not being detected and hense an incorrect update to the database.

How found

Customer reported on 5.0.

Test coverage

This only happens when using store-generated keys, for which we were missing some many-to-many coverage. A previous PR added that coverage, and this PR adds additional validation of the relationship snapshot.

Regression?

No; new feature in 5.0.

Risk

Low. The relationship snapshot is now set correctly.

@ajcvickers ajcvickers added this to the 5.0.x milestone Jan 5, 2021
@ajcvickers ajcvickers requested a review from a team January 5, 2021 18:09
@leecow leecow modified the milestones: 5.0.x, 5.0.3 Jan 5, 2021
@ajcvickers
Copy link
Member Author

Approved by Tactics for 5.0.3; please wait for the branch to open before merging.

@AndriySvyryd
Copy link
Member

Quirk mode?

Base automatically changed from ThereAndBackAgain0104 to release/5.0 January 13, 2021 17:17
@wtgodbe
Copy link
Member

wtgodbe commented Jan 13, 2021

@ajcvickers could you resolve the merge conflicts?

@ajcvickers ajcvickers merged commit 214bc46 into release/5.0 Jan 13, 2021
@ajcvickers ajcvickers deleted the HolidaySnaps0104 branch January 13, 2021 23:49
@ajcvickers ajcvickers removed this from the 5.0.3 milestone Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants