protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aSubjectAccal !== null) { if ($this->aSubjectAccal->isModified()) { $affectedRows += $this->aSubjectAccal->save($con); } $this->setSubjectAccal($this->aSubjectAccal); } 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->aSubject !== null) { if ($this->aSubject->isModified()) { $affectedRows += $this->aSubject->save($con); } $this->setSubject($this->aSubject); } if ($this->aEmployee !== null) { if ($this->aEmployee->isModified()) { $affectedRows += $this->aEmployee->save($con); } $this->setEmployee($this->aEmployee); } if ($this->aCurriculum !== null) { if ($this->aCurriculum->isModified()) { $affectedRows += $this->aCurriculum->save($con); } $this->setCurriculum($this->aCurriculum); } if ($this->aDepartment !== null) { if ($this->aDepartment->isModified()) { $affectedRows += $this->aDepartment->save($con); } $this->setDepartment($this->aDepartment); } if ($this->isModified()) { if ($this->isNew()) { $pk = VSubjectAccalLectorStudentPeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += VSubjectAccalLectorStudentPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }