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

[release/8.0] Don't throw when attempting to load from a newly Added entity with unknown FK values #32368

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

ajcvickers
Copy link
Member

Port of #32343
Fixes #32314

Description

EF8 contains a new feature allowing lazy-loading from detached entities. This brought up a case where lazy-loading would be wrong because shadow FK values are not known. We throw an exception for this case in EF8, but this regressed a valid scenario where the key values are not known because the entity instance is new.

Customer impact

Exception when accessing a lazy-loading enabled navigation backed by a shadow foreign key on an entity in the Added state.

How found

Customer reported on 8.0

Regression

Yes

Testing

Added regression test.

Risk

Low and quirked.

@ajcvickers ajcvickers requested a review from a team November 20, 2023 20:15
@ajcvickers ajcvickers added this to the 8.0.x milestone Nov 20, 2023
@ajcvickers ajcvickers merged commit 0386645 into release/8.0 Nov 21, 2023
7 checks passed
@ajcvickers ajcvickers deleted the 231120_MincePies branch November 21, 2023 19:23
@ajcvickers ajcvickers removed this from the 8.0.x milestone Nov 21, 2023
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.

None yet

2 participants