-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix many-to-one-one queries #3463
Conversation
🦋 Changeset is good to goLatest commit: 1352457 We got this. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
It looks like we could use some more details. Good titles and descriptions help us fix things faster. If you can provide more information please update this issue. |
b232459
to
12b34cf
Compare
@@ -869,10 +872,13 @@ class QueryBuilder { | |||
); | |||
} | |||
|
|||
const subSubQuery = listAdapter.parentAdapter.knex.raw( | |||
`SELECT "${selectCol}" FROM (${subQuery}) AS unused_alias` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need an alias?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.postgresql.org/docs/12/sql-select.html
A sub-SELECT can appear in the FROM clause. This acts as though its output were created as a temporary table for the duration of this single SELECT command. Note that the sub-SELECT must be surrounded by parentheses, and an alias must be provided for it. A VALUES command can also be used here.
0bba4e2
to
51239fd
Compare
No description provided.