title: cakephp AND condition
body: <p>I have two tables </p>
  
  <p>officetypes with fields:id[pk],name,under</p>
  
  <p>officenames with fields:id[pk],name,officetype_id[fk]</p>
  
  <p>two models
  Officename.php</p>
  
  <pre><code>class Officename extends AppModel {
  
      public $name = 'Officename';
      public $belongsTo = array(
          'Officetype' =&gt; array(
              'className'     =&gt; 'Officetype',
              'foreignkey'=&gt;'id'
          )
      );
  </code></pre>
  
  <p>Officetype.php</p>
  
  <pre><code>var $hasMany = array(
          'Officename' =&gt; array(
              'className'     =&gt; 'Officename'               
  
          )
      );
  </code></pre>
  
  <p>Now how can i write conditions in controller to join theses two tables.My conditions is like this:</p>
  
  <pre><code>SELECT a. * , b. *  FROM officetypes AS a, officenames AS b    
      WHERE  
          a.id =3    
      AND 
          b.officeid = a.under
  </code></pre>