title: Controller cannot insert into notification table in yii
body: <p>So I have one primary table <code>comment</code> that has a number of fields. Then
  I want to insert some fields into a <code>notifications</code> table whenever a new record is inserted into <code>comment</code> table.</p>
  
  <p>In the controller, initially I had this and it worked for <code>comment</code> table:</p>
  
  <pre><code>public function actionCreate() {
      $model = new Comment;
      if (isset($_POST['Comment'])) {
          $model-&gt;attributes = $_POST['Comment'];
          if ($model-&gt;save())
              $this-&gt;redirect(array('view', 'id' =&gt; $model-&gt;comment_id));
      }
      $this-&gt;render('create', array(
          'model' =&gt; $model,
      ));
  }
  </code></pre>
  
  <p>Then I put some more lines for the <code>notification</code> table. But it didn't work.</p>
  
  <pre><code>public function actionCreate() {
      $model = new Comment;
      $notif = new Notifications;
      if (isset($_POST['Comment'])) {
          $model-&gt;attributes = $_POST['Comment'];
          $notif-&gt;peg = 'nofriani';
          $notif-&gt;tanggal = new CDbExpression("NOW()");
          $notif-&gt;notif = ' mengirimkan berita ';
          $notif-&gt;isi = $_POST['Comment']['post_id'];
          $notif-&gt;link = 'links';
          $notif-&gt;save();
          if ($model-&gt;save())
              $this-&gt;redirect(array('view', 'id' =&gt; $model-&gt;comment_id));
      }
      $this-&gt;render('create', array(
          'model' =&gt; $model,
      ));
  }
  </code></pre>
  
  <p>The function for <code>comment</code> table still works. But the one for <code>notifications</code> table doesn't. I tried to rearrange the positions but nothing happened. I also changed the <code>$notif-&gt;save();</code> into <code>$notif-&gt;insert();</code> but still nothing happened. What have I missed?</p>
  
  <p>This is the table structure:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS notifications (
     id_notif int(11) NOT NULL AUTO_INCREMENT,
     tanggal date NOT NULL,
     peg varchar(30) NOT NULL,
     notif text NOT NULL,
     isi varchar(30) NOT NULL,
     link varchar(255) NOT NULL,
     PRIMARY KEY (id_notif)
   ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
  </code></pre>