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

[TINY] Fix to #8216 - Query: navigation rewrite fails for queries with navigation inside a subquery inside join inner key selector #8493

Merged
merged 1 commit into from
May 17, 2017

Conversation

maumar
Copy link
Contributor

@maumar maumar commented May 17, 2017

Problem was that navigation inside inner key selector of a JoinClause was always being rewritten to subquery (needed for #3103). However, we should only be doing this for "naked" navs - if the nav itself is inside a subquery it can be safely rewritten into a join.

Fix is to "reset" the state indicating whether we are inside join inner key selector every time we visit SubQuery.

@smitpatel
Copy link
Contributor

There are some test failures in Microsoft.EntityFrameworkCore.Sqlite.FunctionalTests.ComplexNavigationsOwnedQuerySqliteTest.Query_source_materialization_bug_4547

…ation inside a subquery inside join inner key selector

Problem was that navigation inside inner key selector of a JoinClause was always being rewritten to subquery (needed for #3103). However, we should only be doing this for "naked" navs - if the nav itself is inside a subquery it can be safely rewritten into a join.

Fix is to "reset" the state indicating whether we are inside join inner key selector every time we visit SubQuery.
@maumar maumar merged commit 9f75b44 into dev May 17, 2017
@maumar
Copy link
Contributor Author

maumar commented May 17, 2017

Test was non deterministic, added orderby to the inner key selector query, so that it returns same results on all providers

@maumar maumar deleted the fix8216 branch May 17, 2017 21:27
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.

4 participants