title: condition while making relation in YIi
body: <p>Agent:</p>
  
  <p><code>agent_id  (primary key)</code></p>
  
  <p>User:</p>
  
  <pre><code>f_id (foreign key)
  type
  </code></pre>
  
  <p>I have created relation in this way</p>
  
  <pre><code>public function relations() {
      return array(
          'user' =&gt; array(self::HAS_ONE, 'Users', 'f_id'),
      );
  }
  </code></pre>
  
  <p>But I want to add more conditions like join only if <em><code>type=3</code></em> in User table.</p>
  
  <p>thanks.</p>