title: cakephp hasmany relations give error
body: <p>I have a database with some relations.
  I have two tables in this example:</p>
  
  <pre><code>activity_ingredients   ingredient_aliases
  ---------------        ---------------
  id                     id
  ingredient_id          ingredient_id
  </code></pre>
  
  <p>I want to make a conditions into my model to connect the tables by the field "ingredient_id". I have done in this mode:</p>
  
  <pre><code>class ActivityIngredients extends AppModel{
          public $name = 'ActivityIngredients'; 
          public $useTable = 'activity_ingredients';
  
          public $hasMany = array (
          'IngredientAlias' =&gt; array (
              'className'     =&gt; 'IngredientAlias',
              'foreignKey'   =&gt; false,
              'conditions' =&gt; array('ActivityIngredients.ingredient_id = IngredientAlias.ingredient_id')
          )
          );
      }   
  
  class IngredientAlias extends AppModel {
  
      public $name = 'IngredientAlias';
      public $useTable = 'ingredient_aliases';
      public $belongsTo = array(
           'ActivityIngredients' =&gt; array(
              'className'    =&gt; 'ActivityIngredients',
              'foreignKey'   =&gt; false
          )
  
      );  
  } 
  </code></pre>
  
  <p>If I write this code give me an error like this:</p>
  
  <blockquote>
    <p>Column not found: 1054 Unknown column 'ActivityIngredients.ingredient_id' in 'where clause'</p>
  </blockquote>
  
  <p>But if Instead of hasMany I write hasOne it doesn't return any error and is perfect. But my relation is hasMany.. why?</p>
  
  <p>To retrieve data I make a query into my UserController.
  User is associated with Activity with hasMany, Activity is associated with ActivityIngredients in this mode:</p>
  
  <pre><code>public $hasOne = array(
              'ActivityIngredients' =&gt; array(
                  'className' =&gt; 'ActivityIngredients',
                  'conditions' =&gt; '',
                  'dependent' =&gt; true,
                  'foreignKey'   =&gt; 'activity_id'
              )
  </code></pre>
  
  <p>To retrieve data I'm using this query at the moment but I think that I have to change all query now</p>
  
  <pre><code>$this-&gt;User-&gt;Activity-&gt;recursive = 2;
          $activity = $this-&gt;User-&gt;Activity-&gt;findAllByUser_id($id);
          $this-&gt;set('activity', $activity);
  </code></pre>