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

[6.0.1] Avoid NRE in ForeignKeyAttributeConvention #26520

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #26436

Description

An exception is thrown when configuring a foreign key on the principal side of the foreign key configured by data annotations.

Customer impact

There aren't simple workarounds other than removing the attribute, because the exception is thrown during a convention invocation.

How found

Customer report on RC2.

Regression

Yes, from 5.0, introduced in #25211.

Testing

Test for this scenario added in the PR.

Risk

Low; the fix is adding a null check that existed previously. Not adding a quirk mode as that would just result in an exception being thrown.

@AndriySvyryd AndriySvyryd added this to the 6.0.x milestone Nov 3, 2021
@AndriySvyryd AndriySvyryd requested a review from a team November 3, 2021 01:20
@leecow leecow modified the milestones: 6.0.x, 6.0.1 Nov 4, 2021
@AndriySvyryd AndriySvyryd changed the title [6.0.1] Avoid NRE in ForeignKeyAttributeConvention Avoid NRE in ForeignKeyAttributeConvention Nov 9, 2021
@AndriySvyryd AndriySvyryd merged commit 32ca7e7 into release/6.0 Nov 9, 2021
@AndriySvyryd AndriySvyryd deleted the Issue26436 branch November 9, 2021 21:10
@ajcvickers ajcvickers removed this from the 6.0.1 milestone Nov 17, 2021
@ajcvickers ajcvickers changed the title Avoid NRE in ForeignKeyAttributeConvention [6.0.1] Avoid NRE in ForeignKeyAttributeConvention Nov 17, 2021
This pull request was closed.
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.

3 participants