protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aNgRegPeriod !== null) { if ($this->aNgRegPeriod->isModified()) { $affectedRows += $this->aNgRegPeriod->save($con); } $this->setNgRegPeriod($this->aNgRegPeriod); } if ($this->aAcademicCostComponent !== null) { if ($this->aAcademicCostComponent->isModified()) { $affectedRows += $this->aAcademicCostComponent->save($con); } $this->setAcademicCostComponent($this->aAcademicCostComponent); } if ($this->aJobType !== null) { if ($this->aJobType->isModified()) { $affectedRows += $this->aJobType->save($con); } $this->setJobType($this->aJobType); } if ($this->aNgApplicantCategory !== null) { if ($this->aNgApplicantCategory->isModified()) { $affectedRows += $this->aNgApplicantCategory->save($con); } $this->setNgApplicantCategory($this->aNgApplicantCategory); } if ($this->isModified()) { if ($this->isNew()) { $pk = NgRegPeriodRulePeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += NgRegPeriodRulePeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }