Conversation
Filling in settable projectables when whole entities are loaded (EFNext#84) is a behaviour change for anyone upgrading from before it: a materialized entity now carries database-computed values for those properties, and the query rewrite behind it also materializes navigations that were never Include-ed. Callers who only ever project explicitly can now opt out and keep the older semantics. Projectables are still expanded wherever a query reads them; only the assignment onto materialized entities goes away. Enabled by default, so nothing changes unless a caller opts out. Applies to CompatibilityMode.Full. The Limited path builds its replacer through ExpressionExtensions.ExpandProjectables, which has no access to context options, so it is unaffected -- as it already is by the EFNext#132 tracking check, which it also does not see. Tests: two new QueryRootTests cases covering both sides of PopulateSettableProperties(false): a plain entity query is not rewritten, and a projectable read in a Select is still expanded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zmerdev
marked this pull request as ready for review
September 25, 2026 20:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed fix for #224
Adds opt-out via
Hydrating settable projectables when whole entities are loaded (#84) is a behavior change for anyone upgrading from previous versions (I Upgraded from v3 to v6): a materialized entity now carries database-computed values for those properties, and the query rewrite behind it also materializes navigations that were never Include-ed. Callers who only ever project explicitly can now opt out and keep the older semantics. Projectables are still expanded wherever a query reads them; only the assignment onto materialized entities goes away. Enabled by default, so nothing changes unless a caller opts out.
Applies to CompatibilityMode.Full. The Limited path builds its replacer through ExpressionExtensions.ExpandProjectables, which has no access to context options, so it is unaffected -- as it already is by the #132 tracking check, which it also does not see.
Tests: two new QueryRootTests cases covering both sides of PopulateSettableProperties(false): a plain entity query is not rewritten, and a projectable read in a Select is still expanded.