Beispiel #1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aSubjectCurr !== null) {
             if ($this->aSubjectCurr->isModified()) {
                 $affectedRows += $this->aSubjectCurr->save($con);
             }
             $this->setSubjectCurr($this->aSubjectCurr);
         }
         if ($this->aEmployee !== null) {
             if ($this->aEmployee->isModified()) {
                 $affectedRows += $this->aEmployee->save($con);
             }
             $this->setEmployee($this->aEmployee);
         }
         if ($this->aClassGroup !== null) {
             if ($this->aClassGroup->isModified()) {
                 $affectedRows += $this->aClassGroup->save($con);
             }
             $this->setClassGroup($this->aClassGroup);
         }
         if ($this->aAcademicCalendar !== null) {
             if ($this->aAcademicCalendar->isModified()) {
                 $affectedRows += $this->aAcademicCalendar->save($con);
             }
             $this->setAcademicCalendar($this->aAcademicCalendar);
         }
         if ($this->aSubjectGroup !== null) {
             if ($this->aSubjectGroup->isModified()) {
                 $affectedRows += $this->aSubjectGroup->save($con);
             }
             $this->setSubjectGroup($this->aSubjectGroup);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = VCoursePeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += VCoursePeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }