-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: navigation rewrite fails for queries with navigation inside a subquery inside join inner key selector #8216
Comments
After fixing unskip tests in |
This happens because we try to translate navigation in inner key selector of a join clause into a subquery (see #3103 for more info). The translation to subquery that we currently have doesn't work with DIETs, because we assume we can always create a dbset of a type that is the target of the navigation we are rewriting (in this case Level2). However this should only be happening for "naked" navigations. In case of DIETs we have a subquery, so we should be able to translate the navs into normal joins Simpler example:
translates initially to:
|
…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.
…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.
fixed in 9f75b44 |
Paste into
ComplexNavigationsQueryTestBase
:Query model:
Exception:
The text was updated successfully, but these errors were encountered: