Skip to content

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Sep 6, 2023

when processing entity materialization code, adapting it for JSON, we assume the entity type can be a result of BlockExpression (normal case) or a NewExpression (when the ctor is the only thing and we don't need to do any other assignments). However, for proxies, the block is wrapped around Convert node, since the instance generated of of Proxy type, but we expect the actual type there.

Fix is to handle this case and push the convert inside the block to normalize the expression we produce.

Fixes #31597

@maumar maumar requested review from roji and ajcvickers September 6, 2023 23:49
…nd a JSON-mapped complex property

when processing entity materialization code, adapting it for JSON, we assume the entity type can be a result of BlockExpression (normal case) or a NewExpression (when the ctor is the only thing and we don't need to do any other assignments). However, for proxies, the block is wrapped around Convert node, since the instance generated of of Proxy type, but we expect the actual type there.

Fix is to handle this case and push the convert inside the block to normalize the expression we produce.

Fixes #31597
@maumar maumar merged commit c0489f6 into release/8.0 Sep 7, 2023
@maumar maumar deleted the fix31597 branch September 7, 2023 14:33
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.

RC1: UnreachableException when loading with proxies and a JSON-mapped complex property
2 participants