protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aTestApplicant !== null) { if ($this->aTestApplicant->isModified()) { $affectedRows += $this->aTestApplicant->save($con); } $this->setTestApplicant($this->aTestApplicant); } if ($this->aRegionRelatedByPob !== null) { if ($this->aRegionRelatedByPob->isModified()) { $affectedRows += $this->aRegionRelatedByPob->save($con); } $this->setRegionRelatedByPob($this->aRegionRelatedByPob); } if ($this->aReligion !== null) { if ($this->aReligion->isModified()) { $affectedRows += $this->aReligion->save($con); } $this->setReligion($this->aReligion); } if ($this->aCountry !== null) { if ($this->aCountry->isModified()) { $affectedRows += $this->aCountry->save($con); } $this->setCountry($this->aCountry); } if ($this->aDegree !== null) { if ($this->aDegree->isModified()) { $affectedRows += $this->aDegree->save($con); } $this->setDegree($this->aDegree); } if ($this->aRegionRelatedByRegionId !== null) { if ($this->aRegionRelatedByRegionId->isModified()) { $affectedRows += $this->aRegionRelatedByRegionId->save($con); } $this->setRegionRelatedByRegionId($this->aRegionRelatedByRegionId); } if ($this->isModified()) { if ($this->isNew()) { $pk = TestApplicantParentsPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += TestApplicantParentsPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }