title: Relations function in AR Model, many to one relationship
body: <p>So here's the scenario:</p>
  
  <p>I have two table, Issue &amp; Project. </p>
  
  <p>A Project can have many Issue and an Issue can exactly one project.</p>
  
  <p>Since Issue is many to one, do you have to define it? </p>
  
  <p>Cause I know in Project Model I have:</p>
  
  <pre><code>public function relations()
  {
      return array(
      'issues' =&gt; array(self::HAS_MANY, 'Issue', 'project_id'),
      'users' =&gt; array(self::MANY_MANY, 'User', 'tbl_project_user_assignment(project_id, user_id)'),
      );
  }
  </code></pre>
  
  <p>For Issue Model I have nothing but foreign keys:</p>
  
  <pre><code>public function relations()
  {
      // NOTE: you may need to adjust the relation name and the related
      // class name for the relations automatically generated below.
      return array(
          'requester' =&gt; array(self::BELONGS_TO, 'User', 'requester_id'),
          'owner' =&gt; array(self::BELONGS_TO, 'User', 'owner_id'),
          'project' =&gt; array(self::BELONGS_TO, 'Project', 'project_id'),
      );
  }
  </code></pre>
  
  <p>I'm guessing anything to one relationship does not need to be define? </p>
  
  <p>Thank you in advance.</p>
  
  <p>BTW, I'm doing agile Yii book and I ended up asking myself this question. 
  There's a has-one option in AR class (<a href="http://www.yiiframework.com/doc/guide/database.arr" rel="nofollow noreferrer">http://www.yiiframework.com/doc/guide/database.arr</a>).</p>
  
  <p>But is this case optional for some reason?</p>