protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; 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->aSubjectGrading !== null) { if ($this->aSubjectGrading->isModified()) { $affectedRows += $this->aSubjectGrading->save($con); } $this->setSubjectGrading($this->aSubjectGrading); } if ($this->aSubjectCurr !== null) { if ($this->aSubjectCurr->isModified()) { $affectedRows += $this->aSubjectCurr->save($con); } $this->setSubjectCurr($this->aSubjectCurr); } if ($this->aFormula !== null) { if ($this->aFormula->isModified()) { $affectedRows += $this->aFormula->save($con); } $this->setFormula($this->aFormula); } if ($this->isModified()) { if ($this->isNew()) { $pk = CourseRegulationPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += CourseRegulationPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }