title: A find condition about hasMany relationship in cakephp
body: <p>I'm working an action for message search in my project,and here are the two models:Msgcontent and Msgblock.Relationship is Msgblock hasMany Msgcontent.What I want to do is get all the Msgblock records that contain Msgcontent with some searching keyword.My code as follows:</p>
  
  <pre><code>if($keyword)
  {
      $conditions['and'] = array(
                                  'Msgcontent.content LIKE'=&gt;'%'.$keyword.'%',
                                  'Msgcontent.content &lt;&gt;'=&gt;''
                  );
      $results = $this-&gt;Msgblock-&gt;Msgcontent-&gt;find('all',array('group'=&gt;array('Msgblock.chatsessionid'),'conditions'=&gt;$conditions));
  }
  </code></pre>
  
  <p>It seems not a good work.Is there any better solution?Thanks.</p>