Just override a function paginationCount in your model.
Here is the code snippet.
function paginateCount($conditions = null, $recursive = 0, $extra = array()) { $parameters = compact('conditions'); $this->recursive = $recursive; $count = $this->find('count', array_merge($parameters, $extra)); if (isset($extra['group'])) { $count = $this->getAffectedRows(); } return $count; }
This code is tested in version 1.3.x
No comments:
Post a Comment