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
M20 filtered area aggregation and groupBy ambiguous #10092
Comments
@ahmtaras just to confirm, both Note for possible fix: Judging from the generated SQL query in the error message, seems like groupBy doesn't have a table prefix, but orderBy has it. Likely due to order by uses directus/api/src/utils/apply-query.ts Line 40 in 76a306e
whereas group by just returns the column (if it's not a function):
|
@azrikahar yes, both collections have a column named type. I think the problem is name conflict. But there must be another way. I tried alias but same problem with it. Parent Collection id
name
type -> supply || customer || special
records -> O2M Child Collection id
price
type -> money_in || money_out || sales_invoice || purchase_invoice
current -> M2O |
Preflight Checklist
Describe the Bug
I am trying to aggregate and group by filtering from M2O field. But I am getting the below mentioned error.
To Reproduce
Errors Shown
What version of Directus are you using?
9.1.2
What version of Node.js are you using?
16.13.0
What database are you using?
PostgreSQL 14.0, compiled by Visual C++ build 1914, 64-bit
What browser are you using?
Chrome
What operating system are you using?
Windows_NT 10.0.22000
How are you deploying Directus?
locally
The text was updated successfully, but these errors were encountered: