protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aStudentAccal !== null) { if ($this->aStudentAccal->isModified()) { $affectedRows += $this->aStudentAccal->save($con); } $this->setStudentAccal($this->aStudentAccal); } if ($this->aSubjectCurr !== null) { if ($this->aSubjectCurr->isModified()) { $affectedRows += $this->aSubjectCurr->save($con); } $this->setSubjectCurr($this->aSubjectCurr); } if ($this->aCounselingSpec !== null) { if ($this->aCounselingSpec->isModified()) { $affectedRows += $this->aCounselingSpec->save($con); } $this->setCounselingSpec($this->aCounselingSpec); } if ($this->isModified()) { if ($this->isNew()) { $pk = CounselingRaportPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += CounselingRaportPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }