Would using the belongsTo models counterCache not be a better
solution, so that it will not be necessary to perform the counting
every time the users are listed with the post count?

Mentioned in the CakePHP book at:
http://book.cakephp.org/view/1042/belongsTo

Enjoy,
   John

On Jun 13, 3:42 pm, calvin <[email protected]> wrote:
> Ideally, you should be able to create post_count as a virtualField and
> then sort by that, by as the cookbook states, the paginator can't
> order by virtualFields of associated models, so you wouldn't be able
> to sort by it. But there are two simple workarounds for 
> this:http://book.cakephp.org/view/1608/Virtual-fields
>
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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