Replies: 2 comments 3 replies
-
| @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.
Uh oh!
There was an error while loading. Please reload this page.
-
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
CompaniesControllerwith the following methods:actionsis a relationships in myCompanymodel.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_countinstead 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