title: solution for Insert Data In Relation Table by yii FW
body: <p>I want do a project with YiiFramework.
  in this project I have 1 table that have many relation
  I want create a form that insert data in main table and all relation
  for example :
  I want a form that add student information
  I have 2 table
  first : id name family
  and
  second: id student_id field
  I want add data in table 1 and then add data in table 2
  and all of the this jobs do in a form
  do u have any solution for that?</p>
  
  <p>my really reations :</p>
  
  <pre><code>'homehouse' =&gt; array(self::HAS_ONE, 'Homehouse', 'HouseId'),
          'houseType' =&gt; array(self::BELONGS_TO, 'Parametervalues', 'HouseTypeId'),
          'owner' =&gt; array(self::BELONGS_TO, 'Person', 'OwnerId'),
          'region' =&gt; array(self::BELONGS_TO, 'Region', 'RegionId'),
          'housemultimedias' =&gt; array(self::HAS_MANY, 'Housemultimedia', 'HouseId'),
          'housestages' =&gt; array(self::HAS_MANY, 'Housestage', 'HouseId'),
          'tradehouse' =&gt; array(self::HAS_ONE, 'Tradehouse', 'HouseId'),
  </code></pre>