yes it is, you get news withoud NewsComment, so recursive -1 or use contain
Behavior to limit for find method

and than configure Paginator for NewsComment (use conditions for
"NewsComment.news_id" = $yournewsid)
and $comments = $this->paginate('NewsComment');
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/12/24 gloop <[email protected]>

> Hello everbody.
>
> I have 3 Tables:
>  - users [id; username; password]
>  - news [id; user_id; title; comment; created; modified;
> news_comment_count]
>  - news_comment [id; news_id; username; title; comment; created;
> modified; active]
>
> news hasMany news_comment
> news belongsTo user
> news_comment belongsTo news counterCache true; counterScope =>
> NewsComment  1
>
> Now i want to view news with id 2 but i want to show max 20
> news_comment.
>
> Is there a way to use paginate?
>
> Kind Regards
> Steffen
>
> --
> 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
>

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

Reply via email to