Exemplo n.º 1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aCurriculum !== null) {
             if ($this->aCurriculum->isModified()) {
                 $affectedRows += $this->aCurriculum->save($con);
             }
             $this->setCurriculum($this->aCurriculum);
         }
         if ($this->aAcademicCalendar !== null) {
             if ($this->aAcademicCalendar->isModified()) {
                 $affectedRows += $this->aAcademicCalendar->save($con);
             }
             $this->setAcademicCalendar($this->aAcademicCalendar);
         }
         if ($this->aClassGroup !== null) {
             if ($this->aClassGroup->isModified()) {
                 $affectedRows += $this->aClassGroup->save($con);
             }
             $this->setClassGroup($this->aClassGroup);
         }
         if ($this->aTestApplicant !== null) {
             if ($this->aTestApplicant->isModified()) {
                 $affectedRows += $this->aTestApplicant->save($con);
             }
             $this->setTestApplicant($this->aTestApplicant);
         }
         if ($this->aStudentDetail !== null) {
             if ($this->aStudentDetail->isModified()) {
                 $affectedRows += $this->aStudentDetail->save($con);
             }
             $this->setStudentDetail($this->aStudentDetail);
         }
         if ($this->aMember !== null) {
             if ($this->aMember->isModified()) {
                 $affectedRows += $this->aMember->save($con);
             }
             $this->setMember($this->aMember);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = VStudentLoginPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += VStudentLoginPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }