protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aTestApplicantDetail !== null) { if ($this->aTestApplicantDetail->isModified()) { $affectedRows += $this->aTestApplicantDetail->save($con); } $this->setTestApplicantDetail($this->aTestApplicantDetail); } if ($this->aDepartment !== null) { if ($this->aDepartment->isModified()) { $affectedRows += $this->aDepartment->save($con); } $this->setDepartment($this->aDepartment); } if ($this->aClassGroupRelatedByClassGroupId !== null) { if ($this->aClassGroupRelatedByClassGroupId->isModified()) { $affectedRows += $this->aClassGroupRelatedByClassGroupId->save($con); } $this->setClassGroupRelatedByClassGroupId($this->aClassGroupRelatedByClassGroupId); } if ($this->aRegTestPeriod !== null) { if ($this->aRegTestPeriod->isModified()) { $affectedRows += $this->aRegTestPeriod->save($con); } $this->setRegTestPeriod($this->aRegTestPeriod); } if ($this->aLocation !== null) { if ($this->aLocation->isModified()) { $affectedRows += $this->aLocation->save($con); } $this->setLocation($this->aLocation); } if ($this->aClassGroupRelatedByClassId !== null) { if ($this->aClassGroupRelatedByClassId->isModified()) { $affectedRows += $this->aClassGroupRelatedByClassId->save($con); } $this->setClassGroupRelatedByClassId($this->aClassGroupRelatedByClassId); } if ($this->isModified()) { if ($this->isNew()) { $pk = VApplicantTestPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += VApplicantTestPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }