title: yii model->save not working for update value
body: <pre><code>public function actionUpdateprofile(){
      $user = User::model()-&gt;findByPk($_POST['User']['user_id']);
      $profile = Profile::model()-&gt;findByPk($_POST['User']['user_id']);
  
      if(isset($_POST['User']) || isset($_POST['Profile'])){
          $user-&gt;attributes = $_POST['User'];
          $profile-&gt;attributes = $_POST['Profile'];
          $user-&gt;save();
          $profile-&gt;save();
  
      }
  }
  </code></pre>
  
  <p>I did this code for update the value in profile and user table. But it's not working.
  If i send <code>$_POST['Profile']['email'] = 'abc@gmail.com';</code>
  There is no error but database still showed old value. why?</p>
  
  <p>What i did wrong in there? </p>
  
  <p>This is the result for <code>$profile-&gt;attributes</code>. email still have old value.</p>
  
  <pre><code>Array
  (
      [user_id] =&gt; 35
      [lastname] =&gt; asd
      [firstname] =&gt; asrtyr
      [email] =&gt; xyz.gmail.com
      [phoneno] =&gt; 123456
      [prof_img] =&gt; 
      [phoneno2] =&gt; 0
      [agentKey] =&gt; 
      [fb_id] =&gt; 
  )
  </code></pre>