title: Massive assigning to YII AR model
body: <p>I've faced with weird problem(?). Maybe it is documented feature but I coudn't find it.</p>
  
  <p>I have a model class exstended from CActiveRecord. In the model I have method <code>rules</code> which defiles validation rules. </p>
  
  <p>I have controller with action <code>whatever</code>. In this action I'm trying to assign model attributes with data got from $_POST. Here is simplified code snippet from conroller</p>
  
  <pre><code>$model=new SomeModel();
  
  if(isset($_POST['SomeForm']))
  {
      $model-&gt;attributes=$_POST['SomeForm'];
      if($model-&gt;validate())
      {
           $model-&gt;save();
  
      }
  }
  </code></pre>
  
  <p>The problem is in following. Using massive assiginig not all fields are being assing. Only fileds wich have validation rules declared in <code>SomeModel::rules()</code>. If I'm tring to assign data for field which shouldn't be validated then that field comes empty into database.</p>
  
  <p>Could somebody explain what happens?</p>
  
  <p>Thanks in advance</p>