Try this. It will work
$this->Post->contain(false, array('Member', 'Topic'));
$result = $this->paginate();

On Jun 7, 12:43 pm, NappyHeaded <[EMAIL PROTECTED]> wrote:
> I'm having trouble figuring out how to pare down my queries 
> withContainablebehavior when using paginate.
>
> Basically, I am showing Post records, but I want the Topic name
> (parent of Post) and Topic Group name (parent of Topic). If I do
> recursive = 2, then I have 200 queries, so I would like something like
> this (but this don't work):
>
> $this->paginate = array(
>         'Post' => array(
>                 'fields' => array(
>                         'id', 'title', 'description', 'url', 'domain',
> 'recommendation_count', 'comment_count'
>                 ),
>                 'contain' => array(
>                         'Member' => array(
>                                 'fields' => array(
>                                         'id', 'username'
>                                 )
>                         ),
>                         'Topic' => array(
>                                 'TopicGroup'
>                         )
>                 )
>         )
> );
> $posts = $this->paginate();

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to