示例#1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aStudentCourse !== null) {
             if ($this->aStudentCourse->isModified()) {
                 $affectedRows += $this->aStudentCourse->save($con);
             }
             $this->setStudentCourse($this->aStudentCourse);
         }
         if ($this->aGradeComponent !== null) {
             if ($this->aGradeComponent->isModified()) {
                 $affectedRows += $this->aGradeComponent->save($con);
             }
             $this->setGradeComponent($this->aGradeComponent);
         }
         if ($this->aGradeSpec !== null) {
             if ($this->aGradeSpec->isModified()) {
                 $affectedRows += $this->aGradeSpec->save($con);
             }
             $this->setGradeSpec($this->aGradeSpec);
         }
         if ($this->aCitation !== null) {
             if ($this->aCitation->isModified()) {
                 $affectedRows += $this->aCitation->save($con);
             }
             $this->setCitation($this->aCitation);
         }
         if ($this->aSubject !== null) {
             if ($this->aSubject->isModified()) {
                 $affectedRows += $this->aSubject->save($con);
             }
             $this->setSubject($this->aSubject);
         }
         if ($this->aAcademicCalendar !== null) {
             if ($this->aAcademicCalendar->isModified()) {
                 $affectedRows += $this->aAcademicCalendar->save($con);
             }
             $this->setAcademicCalendar($this->aAcademicCalendar);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = VFinalRaportPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += VFinalRaportPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }