[0] code: '42703',
[0] detail: 'There is a column named "projecttransaction_id" in table "project_projectinternalcosts_projectinternalcostitems_projecttr", but it cannot be referenced from this part of the query.',
[0] hint: 'To reference that column, you must mark this subquery with LATERAL.',
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.7
Describe the Bug
I have a pretty nested query.
It results in this error:
I can make the query work if i go one level down:
Or alternatively if i remove the reverse access:
The following query also fails (similar error message)
If i remove the one-to-many access it works
But if i reduce the depth:
This also works
Expected behavior
It should work in all conditions
Environment & setup
No response