> I dont think i have it setup to work that way, below is the controllers
> for posts and comments along with the index.thtml of posts
>
> http://pastecode.net/?action=viewpost&tag=1007
>
>
> >
>
>   


hi.

you need a association in your post-model like this:

public $hasMany = array('Comment' =>
                       array('className'    => 'Comment',
                             'conditions'   => 'Comment.public = \'1\'',
                             'order'        => '',
                             'foreignKey'   => 'post_id',
                             'dependent'    =>  true,
                             'exclusive'    =>  false,
                             'finderSql'    => '',
                             'counterSql'   => ''
                             )
                         );

see the manual for details!

cheers.

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

Reply via email to