title: Use another model inside a model
body: <p>This would be a general question, to specifics (about Yii),</p>
  
  <p>I just want to know if this is a good practice, or simply if its correct:</p>
  
  <p>On my _form view, I am calling a another model not from the current model in used;</p>
  
  <pre><code>// @model Clients
  &lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
  'id'=&gt;'myid-form',
  'enableAjaxValidation'=&gt;false,
  )); ?&gt;
  
  &lt;div class="row"&gt;
    &lt;?php echo $form-&gt;labelEx($model,'Debtor'); ?&gt;
    &lt;?php echo $form-&gt;dropDownList($model, 'Debtor'
          , CHtml::listData(Debtor::model()-&gt;findAll(), 'DebtorCode', 'DebtorDesc'),array('empty'=&gt;'(Select Debtor)')); ?&gt;
    &lt;?php echo $form-&gt;error($model,'Debtor'); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If I am wrong, can someone tell me what is the correct way before it becomes a habit..</p>
  
  <p>TIA</p>