-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Stop configuring lazy-loading for properties that will always be eager-loaded #12462
Comments
Notes from discussion with @ajcvickers and @smitpatel: Define "properties that will always be eager loaded" as an
In that case set up such that a) we do not need the |
This isn't safe as we'll add an opt-out |
@AndriySvyryd @smitpatel What would be safe? |
|
We don't know whether the entity is being tracked at model validation time (which is when the current error is thrown). After more discussion with @AndriySvyryd and @ajcvickers we'll do something like: if (navigation.ForeignKey.IsOwnership)
{
if (!navigation.IsOnDependent)
{
// no-op (do not throw and do not warn)
}
else
{
// do not throw - this will be eager loaded
}
}
else
{
// throw as normal
} |
For example, for owner to owned navigation properties in aggregates.
See also #10787 (comment)
The text was updated successfully, but these errors were encountered: