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

Generate values for PK properties that are also self-referencing FK properties #22585

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

ajcvickers
Copy link
Member

@ajcvickers ajcvickers commented Sep 17, 2020

Fixes #22573

Description

This is a regression from preview 8 on a very common case for a major new feature. We added FK constraints to the TPT model in RC1, but this broke value generation for the PK property of any TPT mapping.

Customer Impact

Very common scenario on a major new feature.

How found

Customer reported moving from preview 8 to RC1.

Test coverage

We were lacking test coverage for change tracking in TPT models. This PR adds a TPT variation to our main change tracking tests (1622 tests). This revealed one additional bug which we will triage separately.

Regression?

New feature in 5.0, but regression from preview 8.

Risk

Low. Issue is well understood and fix is small.

@ajcvickers ajcvickers requested a review from a team September 17, 2020 17:48
Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call IsKey() before IsForeignKeyToSelf() for perf

@ajcvickers
Copy link
Member Author

@AndriySvyryd Already made that change based on previous comment. Just pushed.

@ajcvickers ajcvickers merged commit 46a6e9b into release/5.0-rc2 Sep 18, 2020
@ajcvickers ajcvickers deleted the GraphPaperCuts0917 branch September 18, 2020 16:50
ajcvickers added a commit that referenced this pull request Sep 18, 2022
…eferencing FK properties"

See #22585, #22573, #26448

Async code pat was not fixed in original PR. However, this was not exposed until additional bug fix for #26448 in EF7 RC2
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.

2 participants