示例#1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aTestApplicant !== null) {
             if ($this->aTestApplicant->isModified()) {
                 $affectedRows += $this->aTestApplicant->save($con);
             }
             $this->setTestApplicant($this->aTestApplicant);
         }
         if ($this->aTestSchedule !== null) {
             if ($this->aTestSchedule->isModified()) {
                 $affectedRows += $this->aTestSchedule->save($con);
             }
             $this->setTestSchedule($this->aTestSchedule);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = TestApplSchedPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += TestApplSchedPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }