コード例 #1
0
ファイル: BaseEtimeRsvp.php プロジェクト: soon0009/EMS
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aEtime !== null) {
             if ($this->aEtime->isModified()) {
                 $affectedRows += $this->aEtime->save($con);
             }
             $this->setEtime($this->aEtime);
         }
         if ($this->aRsvp !== null) {
             if ($this->aRsvp->isModified()) {
                 $affectedRows += $this->aRsvp->save($con);
             }
             $this->setRsvp($this->aRsvp);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = EtimeRsvpPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += EtimeRsvpPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }