On 8/22/07, Feris Thia <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> Sorry for repost... but I do really need to know this and if somebody
> may help me.
>
> I have a model which has several belongsTo and hasMany relationships,
> then I try to do a pagination with the model itself and it functions
> without any problem.
>
> But then.. when I add recursive options in order to use pagination for
> the other model, it lost all pagination functionalities (cannot
> navigate & sort).
>
> My code for pagination with working one is below,
>
> $this->paginate('MyModel', $conditions);
>
> and the non working one is below,
>
> $this->paginate('MyModel', $conditions, array('recursive'=>1));
>
> What's wrong ?
Try this:
$this->MyModel->recursive = 1;
$this->paginate('MyModel', $conditions);
--
Chris Hartjes
Senior Developer
Cake Development Corporation
My motto for 2007: "Just build it, damnit!"
@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---