Replies: 2 comments
-
@mr-Sepi0l hey, I just ran this in a project that I have a similar aggregate and it looks like it fails exactly because of the table prefix before the count field in the order clause. I was able to fix it by extending the
Basically if the string ends with |
Beta Was this translation helpful? Give feedback.
-
This will of course be a problem if a you have an actual field in the table called |
Beta Was this translation helpful? Give feedback.
-
Hey there,
I've been searching for hours to figure how to sort a list by an aggreate column and got stuck.
Let assume I have a
CompaniesController
with the following methods:actions
is a relationships in myCompany
model.When I dump the SQL generated it actually generate the aggregate in the query but when I add the sort
actions_count
, the query try to order bycompanies
.actions_count
instead ofactions_count
.Would you know a workaround other than building the whole query by myself just for that detail ?
Thanks, let me know if I can provide further informations.
Beta Was this translation helpful? Give feedback.
All reactions