If you have the recursive property on your Article model set to 1 or
higher, a find() or read() function call in the Article model will
automatically associate the related comments.

Try:
$this->Article->recursive = 1;
$data = $this->Article->read($article_id);

then,

pr($data);

To see the the associated data in the array.

To paginate, you could probably make another function that searches
for things more manually:

function paginateAssociatedComments($article_id)
{
    $data = $this->paginate($this->Article-
>Comment,array('conditions'=>array('Comment.article_id'=>
$article_id)));
    $this->set('data',$data);
    $this->layout = 'ajax';

}

Or something like that.

-Casey

On Dec 18, 7:07 am, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> Em..anyone..?
>
> If it's not doable I'd also like to know..
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to