title: cakephp 2.x beforeFind associated models
body: <p>How do you propagate a beforeFind() condition into associated models?</p>
  
  <p>Taking for example a School, Course, and Term (which should be a Class, but that word is reserved in php), this is the code used on the Course model:</p>
  
  <pre><code>/**
   * beforeFind method
   *
   * Filters by the school (based on the url)
   * @param  array  $query The find query
   * @return array  $query The query with the added condition
   */
  public function beforeFind($query = array()) {
      parent::beforeFind($query);
      $query['conditions'] = (is_array($query['conditions'])) ? $query['conditions'] : array();
      $this-&gt;School-&gt;id = CakeSession::read('School');
      $conditions = array(get_class($this).'.school_id' =&gt; $this-&gt;School-&gt;id);
      $query['conditions'] = array_merge($query['conditions'], $conditions);
      return $query;
  }
  </code></pre>
  
  <p>When I'm fetching courses, the conditions apply correctly:</p>
  
  <pre><code>$this-&gt;Course-&gt;contain = array('School');
  $this-&gt;Course-&gt;find('all');
  </code></pre>
  
  <p>This returns all the courses for the current school based on the session.
  When I'm fetching classes, the school condition does not apply:</p>
  
  <pre><code>$this-&gt;Term-&gt;contain = array('Course');
  $this-&gt;Term-&gt;find('all');
  </code></pre>
  
  <p>It returns me all the terms, with all the courses, without the beforeFind conditions on the Course model. 
  Is it possible to add a beforeFind condition on a parent model that propagates to its children models, without having to code the beforeFind on every children model?</p>