title: Can I force Yii to use particular alias in generated SQL
body: <p>I'm retrieving my records using <code>CActiveRecord</code> with a <code>with()</code> statement:</p>
  
  <pre><code>Probes::model()-&gt;with(array
  (
      'user',
      'results',
      'results.answer',
      'survey',
      'survey.questions'
  ))-&gt;findByPk($id)
  </code></pre>
  
  <p>I wanted to use <code>GROUP BY</code> on <code>question_id</code> field of <code>survey.questions</code> relation, so I changed above to:</p>
  
  <pre><code>'survey.questions'=&gt;array('group'=&gt;'survey.questions.question_id'),
  </code></pre>
  
  <p>This caused a SQL exception <code>1054 Unknown column</code>. However, by analyzing attached SQL code:</p>
  
  <pre><code>`questions`.`question_id` AS `t6_c2`
  </code></pre>
  
  <p>I managed to find out, that I have to use <code>t6_c2</code> alias (auto-generated by Yii?). So, another change to:</p>
  
  <pre><code>'survey.questions'=&gt;array('group'=&gt;'t6_c2'),
  </code></pre>
  
  <p>and the problem is solved.</p>
  
  <p>But, then again, alias <code>t6_c2</code> seems quite... "unstable" (auto-generated?) for me. Can I force Yii to in this part of generated SQL some other alias, provided by me? Or how certain can I be, that this part of SQL code won't change upon next (some later) generation? Or -- is there any other way to achieve, what I want to achieve?</p>