Hello,
In fact i found the solution.
First of all:
I paginate in the references controller.
I solved the problem with:
$group = array();
$group[] = 'Lot.id HAVING COUNT(Watch.id) > 0';
$this->paginate['Lot'] = array(
'limit' => 50,
'contain' => array('Reference', 'Keyword', 'Watch', 'Auction'),
'group' => $group
);
$lots = $this->paginate('Lot', $conditions);
Thanks all for your help!
On 10 mar, 16:39, Sam Bernard <[email protected]> wrote:
> Paginate is a controller function, not a model function- so you can't call
> it on the model.
>
> I'm a little confused as to what you are trying to do- what controller are
> you trying to paginate your "Lot" records from?
>
> Also, have you read the cookbook section on
> pagination?http://book.cakephp.org/view/1231/Pagination
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php