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

Throw a better exception for relationships to keyless entity types #26143

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #24373

Description

Using a keyless entity type as the principal is invalid, however we didn't have an explicit check for this.

Customer impact

Without this an NRE is thrown when a keyless entity type is used as the principal.

How found

Customer

Regression

No.

Testing

Test for this scenario added in the PR.

Risk

Low, just a better exception message.

@AndriySvyryd AndriySvyryd requested a review from a team September 22, 2021 19:30
@AndriySvyryd AndriySvyryd changed the title Throw a better exception for relationships to keyless entity types [6.0] Throw a better exception for relationships to keyless entity types Sep 22, 2021
@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] Throw a better exception for relationships to keyless entity types Throw a better exception for relationships to keyless entity types Sep 23, 2021
@AndriySvyryd AndriySvyryd merged commit af389b2 into release/6.0 Sep 23, 2021
@AndriySvyryd AndriySvyryd deleted the Issue24373 branch September 23, 2021 06:46
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.

Data Annotation of Keyless Attribute on class can't override in Fluent API
3 participants