title: Cakephp 2.8.4 ignoring hasMany
body: <p>This is a very odd issue that I have not been able to figure out for a very long time.</p>
  
  <p>I have a model <strong>Upload</strong>, with several <strong>hasMany</strong> all being ignored by <strong>UploadModel</strong>.</p>
  
  <p>For example. <strong>Upload</strong> hasMany <strong>Face</strong>.</p>
  
  <p>On comments table I have a field called foreign_key that hosts the Upload.id.
  So the relationship in UploadModel looks like this:</p>
  
  <pre><code>$hasMany = ['Face' =&gt; ['foreignKey' =&gt; 'Face.upload_id']];
  </code></pre>
  
  <p>When performing a find in Upload with contain Face + conditions <strong>[Face.celebrity_id = 4018]</strong> I get the following error because the query is missing the Left Join to Face:</p>
  
  <pre><code>$media = $this-&gt;Upload-&gt;find('all',array(
          'conditions' =&gt; array(
              'Face.celebrity_id' =&gt; 4018
          ),
          'contain' =&gt; array(
              'Face'
          )
      ));
  
  SQL Query: 
  SELECT `Upload`.`id`, `Upload`.`user_id`, `Upload`.`filename`, `Upload`.`created` 
  FROM `uploads` AS `Upload` 
  WHERE `Face`.`celebrity_id` = 4018;
  
  SQL Error:
  Unknown column 'Face.celebrity_id' in 'where clause'
  </code></pre>
  
  <h2><strong>As you can see the query is missing the left joing to Face, that's all the problem</strong></h2>
  
  <p>If instead of in the $hasMany, I add the Face relationship in $belongsTo, it adds the relationship to the query and it works!</p>
  
  <p>But an Upload can have many Faces, and Face.upload_id  has the foreignKey to Upload, so IT NEEDS TO BE A motherf***** HASMANY... lol</p>
  
  <hr>
  
  <p>As you can see, this is terrible, I am already desperate, I have bypassed the issue by adding a bindModel() before each query, but it is totally unnecessary, the hasMany should work!!!!   f****!!!!!</p>
  
  <p>The query that I want Cake to perform for me is this:</p>
  
  <pre><code>SELECT `Upload`.`id`, `Upload`.`filename` FROM `uploads` AS `Upload` 
  LEFT JOIN `upload_faces` AS `Face` ON (`Upload`.id = `Face`.`upload_id`)
  WHERE `Face`.`celebrity_id` = 4018
  </code></pre>
  
  <p><strong>I appreciate any help, thanks.</strong></p>