Greetings! I have 3 models:
jobs hasMany job_comments job_comments belongsTo jobs Site->Job->JobComment Help me please to find works on a site which have 'trouble' comments $this->Site->find( 'all', array ( 'fields' => array('Site.id'), 'conditions' => array ('Site.id' => 3), 'contain' => array ( 'Job' => array( 'conditions' => array ('Job.site_id' => 3), 'JobComment' => array ( 'fields' => array ('JobComment.comment'), 'conditions' => array ( 'JobComment.trouble' => 1 ) ) ) ) ) )); ...It doesn't work good. I no need all Jobs on site. I need only Jobs which have JobComment.trouble = 1 Thx. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---