protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aAcademicCalendar !== null) { if ($this->aAcademicCalendar->isModified()) { $affectedRows += $this->aAcademicCalendar->save($con); } $this->setAcademicCalendar($this->aAcademicCalendar); } if ($this->aCurriculum !== null) { if ($this->aCurriculum->isModified()) { $affectedRows += $this->aCurriculum->save($con); } $this->setCurriculum($this->aCurriculum); } if ($this->isModified()) { if ($this->isNew()) { $pk = ScoreRuleGroupPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += ScoreRuleGroupPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }