protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aEmployee !== null) { if ($this->aEmployee->isModified()) { $affectedRows += $this->aEmployee->save($con); } $this->setEmployee($this->aEmployee); } if ($this->aReligionRelatedByReligionId !== null) { if ($this->aReligionRelatedByReligionId->isModified()) { $affectedRows += $this->aReligionRelatedByReligionId->save($con); } $this->setReligionRelatedByReligionId($this->aReligionRelatedByReligionId); } if ($this->aReligionRelatedBySpouseReligionId !== null) { if ($this->aReligionRelatedBySpouseReligionId->isModified()) { $affectedRows += $this->aReligionRelatedBySpouseReligionId->save($con); } $this->setReligionRelatedBySpouseReligionId($this->aReligionRelatedBySpouseReligionId); } if ($this->aEmployeeLevel !== null) { if ($this->aEmployeeLevel->isModified()) { $affectedRows += $this->aEmployeeLevel->save($con); } $this->setEmployeeLevel($this->aEmployeeLevel); } if ($this->aMaritalStatus !== null) { if ($this->aMaritalStatus->isModified()) { $affectedRows += $this->aMaritalStatus->save($con); } $this->setMaritalStatus($this->aMaritalStatus); } if ($this->aEmployeeDivision !== null) { if ($this->aEmployeeDivision->isModified()) { $affectedRows += $this->aEmployeeDivision->save($con); } $this->setEmployeeDivision($this->aEmployeeDivision); } if ($this->isModified()) { if ($this->isNew()) { $pk = EmployeeDetailPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += EmployeeDetailPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }