Paginate will not automatically do a count of hit records for you ... but if you add a hit_count field to your ItemModel table and then add counterCache to your HitModel belongsTo association Cake will keep a count of hits upon creation and deletion of a HitModel record and you will then be able to sort your ItemModel paginate result by that field.
Try looking at .... http://book.cakephp.org/view/490/counterCache-Cache-your-count Regards, Paul. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
