-
Notifications
You must be signed in to change notification settings - Fork 3.3k
RC1: UnreachableException when loading with proxies and a JSON-mapped complex property #31597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc @maumar |
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. |
maumar
added a commit
that referenced
this issue
Sep 6, 2023
…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
added a commit
that referenced
this issue
Sep 6, 2023
…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
added a commit
that referenced
this issue
Sep 7, 2023
…nd a JSON-mapped complex property (#31656) 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal repro:
Exception:
The text was updated successfully, but these errors were encountered: