I have a pretty modified pagination request using multiple links, etc., but for some reason the paginator-> counter () parameter never matches the count query results.
You can see it in action at http://dev.qreer.com/ - by choosing various LHS navigation options, the query output is lower, and the paginator count seems rather random.
Any idea where I can start debugging this?
In the controller of work orders:
$this->paginate = $this->Job->paginateParams($data); $jobs = $this->paginate('Job'); $this->set(compact('jobs'));
In the model:
function paginateParams($data = null){ //lots of joins + conditions return array('contain' => $contain, 'recursive' => 0,'joins' => $joins, 'conditions' => $conditions, 'group' => 'Job.id', 'order' => $order); }
Sample Join (internal joins for all join tables and data tables):
array( 'table' => 'education_backgrounds', 'alias' => 'EducationBackground', 'type' => 'INNER', 'conditions' => array('EducationBackgroundsJobs.education_background_id = EducationBackground.id'), ),
Example condition:
'EducationBackground.name' => array('Aerospace Engineering');
source share