title: CakePHP find method with JOIN
body: <p>Hi,</p>
  
  <p>I need to do the following query using the CakePHP <code>find</code> method:</p>
  
  <pre><code>SELECT *
  FROM `messages`
  INNER JOIN users ON messages.from = users.id
  WHERE messages.to = 4
  ORDER BY messages.datetime DESC
  </code></pre>
  
  <p>Basically I have:</p>
  
  <ul>
  <li><code>messages</code> table with a <code>Message</code> model</li>
  <li><code>users</code> table with <code>User</code> model</li>
  </ul>
  
  <p>and want to retrieve information from both tables in one query. The <code>users.id</code> field is the same as the <code>messages.from</code> field, so that's what the join is on.</p>
  
  <p>I am doing it in my <code>MessagesController</code> so it would need to be something like:</p>
  
  <pre><code>$this-&gt;Message-&gt;find();
  </code></pre>
  
  <p>Thanks</p>