title: How to use inner join in CakePHP models
body: <p>I have two tables that I want to <code>INNER JOIN</code>, I spent hours but I had no luck. I will be very please if some could help.</p>
  
  <p>My first table: <code>properties</code></p>
  
  <p><code>id | room | price | location_id</code></p>
  
  <p>My second table is: <code>locations</code></p>
  
  <p><code>id | country | province | district</code></p>
  
  <p>Note: <code>location_id</code> in <code>Properties</code> is 'id' in <code>Location</code></p>
  
  <p>I want to use basic model associations like <code>hasOne</code>, <code>belongsTo</code> and so on. </p>
  
  <p>What should I put in my models so that I can basically get the following result?</p>
  
  <pre><code>SELECT
      Property.room,
      Property.price,
      Location.province
  FROM
      properties AS Property
  INNER JOIN locations AS Location ON Property.location_id = Location.id
  </code></pre>
  
  <p>Thanks in advance!</p>