Skip to content

Conversation

@maumar
Copy link
Contributor

@maumar maumar commented Mar 23, 2023

Problem was that when we projection collection of entities we use result coordinator and generate different pattern in shaper code. Json entity shaper code is generated inside resultContext.Values == null block and all the products should be referred to via resultContext.Values array access. We were not doing that for json, so in the final projection code we would refer to parameters (storing the actual json entities) that were out of scope.

Fix is to use the correct result coordinator pattern, just like we do for non-json entities.

Fixes #30266

@maumar maumar requested a review from roji March 23, 2023 23:04
@maumar maumar force-pushed the fix30266 branch 2 times, most recently from d7ef5c6 to 0899e4e Compare March 24, 2023 00:22
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐑 🇮🇹

…Json columns and ICollections

Problem was that when we projection collection of entities we use result coordinator and generate different pattern in shaper code. Json entity shaper code is generated inside `resultContext.Values == null` block and all the products should be referred to via resultContext.Values array access.
We were not doing that for json, so in the final projection code we would refer to parameters (storing the actual json entities) that were out of scope.

Fix is to use the correct result coordinator pattern, just like we do for non-json entities.

Fixes #30266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linq select cannot project an entity containing both Json columns and ICollections

3 participants