I don't know how $paginator->sort('AssocModel',AssocModel.field') can
help in the topic we are discussing (aggregate fields, like SUM, MIN,
MAX or AVG). It only seems to work on the 1 part of N to 1
relationships, and I don't find how to indicate the aggregate function
to be used... Furher information would be highly appreciated.

I'm sorry, but I don't understand your second statement (I'm not a
native speaker). Are you suggesting to order the return set of model-
>paginate()?

Thank you for your time.

On May 4, 8:26 pm, starkey <[email protected]> wrote:
> Like this:
> <th><?php echo $paginator->sort('AssocModel',AssocModel.field');?></
> th>
>
> Otherwise, use a stored procedure and Cake should handle the return
> set like a query return and sort the aggregate field as if it were a
> column.
>
> On May 4, 9:59 am, Hrmo <[email protected]> wrote:
>
> > I can't figure out how to sort paginated results by an aggregate field
> > (like sorting posts by number of comments). The only solution I found
> > (https://trac.cakephp.org/ticket/5220) involves changing the core of
> > cakePHP, and I prefer not to do that. Any solution?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to