Skip to content
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

Query: Wrap up support for owned/weak entities #16995

Merged
merged 1 commit into from
Aug 6, 2019

Conversation

smitpatel
Copy link
Contributor

Close #15285

InMemory tracked by #16994


return lambdaBody;
internal Expression ExpandWeakEntities(SelectExpression selectExpression, Expression lambdaBody)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't figure out better way to do this for now.
The issue is, projectionBinding may revisit expression multiple times but ShapedQueryExpression is mutating so we have mutated on failed translation and we cannot reuse it. Hence we need to expand weak entities (introducing ShapedQueryExpression) from projection binding expression visitor.

@@ -6,8 +6,7 @@

namespace Microsoft.EntityFrameworkCore.Query
{
// issue #15285
internal class ComplexNavigationsWeakQuerySqlServerTest : ComplexNavigationsWeakQueryTestBase<ComplexNavigationsWeakQuerySqlServerFixture>
public class ComplexNavigationsWeakQuerySqlServerTest : ComplexNavigationsWeakQueryTestBase<ComplexNavigationsWeakQuerySqlServerFixture>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

😰

@smitpatel smitpatel merged commit 7653f08 into release/3.0 Aug 6, 2019
@ghost ghost deleted the smit/WeakEntities branch August 6, 2019 22:30
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.

QueryRewrite: correctly handle weak/owned entities
2 participants