Esempio n. 1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aStudentAccal !== null) {
             if ($this->aStudentAccal->isModified()) {
                 $affectedRows += $this->aStudentAccal->save($con);
             }
             $this->setStudentAccal($this->aStudentAccal);
         }
         if ($this->aCur13TermSpec !== null) {
             if ($this->aCur13TermSpec->isModified()) {
                 $affectedRows += $this->aCur13TermSpec->save($con);
             }
             $this->setCur13TermSpec($this->aCur13TermSpec);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = Cur13GradePeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += Cur13GradePeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }