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

Allow HasKey to override HasNoKey #26144

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Allow HasKey to override HasNoKey #26144

merged 1 commit into from
Sep 22, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #24789

Description

Once HasNoKey is called there is no way of override it using Fluent API.

Customer impact

When extending an external model or a model created by scaffolding customers need to use low-level Metadata API to override HasNoKey

How found

Customer

Regression

No.

Testing

Test for this scenario added in the PR.

Risk

Low, the effect of the change is straightforward.

@AndriySvyryd AndriySvyryd requested a review from a team September 22, 2021 19:48
@AndriySvyryd
Copy link
Member Author

@Pilchie For approval

@Pilchie
Copy link
Member

Pilchie commented Sep 22, 2021

Approved for EF Core 6.0

@AndriySvyryd AndriySvyryd changed the title [6.0] Allow HasKey to override HasNoKey Allow HasKey to override HasNoKey Sep 22, 2021
@AndriySvyryd AndriySvyryd merged commit 2a9ffbb into release/6.0 Sep 22, 2021
@AndriySvyryd AndriySvyryd deleted the Issue24789 branch September 22, 2021 23:12
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

Successfully merging this pull request may close these issues.

HasKey should override previous HasNoKey
3 participants