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
Extracting out the de-duplication work which is going to be (mostly) complex work in shaper.
The idea is to detect cases where we already projected a given json entity and re-use it, rather than adding it to projection again.
Examples:
One=x.MyJosnCollection,
Two =x.MyJsonCollection[2]
One=x.MyJosnReference
Two =x.MyJosnReference.MyNestedJsonCollection[prm]
We do that for references already, but it's much harder for collections because we need to keep track of ordinal keys (which never change when we de-duplicate references only). Also, collection elements are generated in the body of IncludeJsonEntityCollection, so we don't have access to individual entities at compile time. Probably will need to use the resulting collections and access their required elements. We need to pay attention to ordering of things, so that we don't access the element in JSON collection before that collection has been populated. We could maybe use similar strategy as include does - store those expressions in separate list, so that when we construct the final block expression, those collection accesses come after.
Until this is done, all queries projecting JSON which accesses element in a collection must be set to no-tracking, even if the owner entity is also projected.
The text was updated successfully, but these errors were encountered:
Part (or continuation) of #28648 work.
Extracting out the de-duplication work which is going to be (mostly) complex work in shaper.
The idea is to detect cases where we already projected a given json entity and re-use it, rather than adding it to projection again.
Examples:
We do that for references already, but it's much harder for collections because we need to keep track of ordinal keys (which never change when we de-duplicate references only). Also, collection elements are generated in the body of IncludeJsonEntityCollection, so we don't have access to individual entities at compile time. Probably will need to use the resulting collections and access their required elements. We need to pay attention to ordering of things, so that we don't access the element in JSON collection before that collection has been populated. We could maybe use similar strategy as include does - store those expressions in separate list, so that when we construct the final block expression, those collection accesses come after.
Until this is done, all queries projecting JSON which accesses element in a collection must be set to no-tracking, even if the owner entity is also projected.
The text was updated successfully, but these errors were encountered: