title: How create a query with a join in cakephp
body: <p>I need to do the following query using the CakePHP find method:</p>
  
  <pre><code>SELECT * FROM fydee.clients_groups join clients on clients_groups.client_id = clients.id where clients.deleted = 0 and group_id = 7;
  </code></pre>
  
  <p>The Client_groups.client_id field is the same as the clients.idfield, so that's what the join is on. How can i create this in cakephp?</p>
  
  <p>i have tried:</p>
  
  <pre><code>$clients = $this-&gt;Groups-&gt;find('all', array(
              'joins' =&gt; array(
                  array(
                      'table' =&gt; 'Clients',
                      'alias' =&gt; 'ClientsJoin',
                      'type' =&gt; 'INNER',
                      'conditions' =&gt; array(
                          'ClientsJoin.id = client.id'
                      )
                  )
              ),
              'conditions' =&gt; array(
                  'Group.id' =&gt; $_POST['group_id'],
                  'Client.deleted' =&gt; 0
              )
          ));
  </code></pre>