Re: Containable get posts with active comments

2011-11-02 Thread Jeremy Burns | Class Outfit
You would need to use joins here: http://book.cakephp.org/view/1047/Joining-tables Looks complex at first, but actually isn't. And once you've mastered it you'll use it in preference to plain old SQL where normal finds won't cut it. Jeremy Burns Class Outfit http://www.classoutfit.com On 2 No

Containable get posts with active comments

2011-11-02 Thread nastya
Hello Could you please help me with a small issue? There are Posts that are active. Posts can have comments. Comments can be active or not. How to get only those active Posts that have active Comments? $this->Post->find('all', array( 'conditions' => array('Post.active'=>1), 'contain' =>