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