You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning when query materializes an entity outside the top projection #12667
Given the current behavior, the p passed to IsCustomer won't be tracked, and the Addresses navigation property won't be populated.
If IsCustomer(p) returns false, then that person entity won't end in the query results. For a tracked query that means that the instance will be discarded and not tracked. Moreover, for specific providers (e.g. Cosmos DB), even if IsCustomer(p) returns true, p could be a different object instance from the one that will be included in query results.
Hence the proposal is to make this situation trigger a warning.
changed the title [-]Consider warning when query materializes an entity outside the top projection[/-][+]Warning when query materializes an entity outside the top projection[/+]on Jul 20, 2018
Note that the scenario above can become very inefficient because for the second query that we create to include the Addresses collection the evaluation of the client predicate will need to fetch from People again. @smitpatel is going to create an issue that optimizes cases like this (and some others) by filtering the second query in terms of the collection of key values obtained from the first query.
We decided not to do client eval outside of the top projection. Which means that above query would just throw rather than translating to server (full server translation is not possible). So we don't need to warn anymore.
Activity
[-]Consider warning when query materializes an entity outside the top projection[/-][+]Warning when query materializes an entity outside the top projection[/+]divega commentedon Jul 20, 2018
Note that the scenario above can become very inefficient because for the second query that we create to include the Addresses collection the evaluation of the client predicate will need to fetch from People again. @smitpatel is going to create an issue that optimizes cases like this (and some others) by filtering the second query in terms of the collection of key values obtained from the first query.
smitpatel commentedon Jul 24, 2018
#12776
smitpatel commentedon Jan 25, 2019
We decided not to do client eval outside of the top projection. Which means that above query would just throw rather than translating to server (full server translation is not possible). So we don't need to warn anymore.