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->aTestSchedule !== null) { if ($this->aTestSchedule->isModified()) { $affectedRows += $this->aTestSchedule->save($con); } $this->setTestSchedule($this->aTestSchedule); } if ($this->aLocationRelatedByLocation1 !== null) { if ($this->aLocationRelatedByLocation1->isModified()) { $affectedRows += $this->aLocationRelatedByLocation1->save($con); } $this->setLocationRelatedByLocation1($this->aLocationRelatedByLocation1); } if ($this->aLocationRelatedByLocation2 !== null) { if ($this->aLocationRelatedByLocation2->isModified()) { $affectedRows += $this->aLocationRelatedByLocation2->save($con); } $this->setLocationRelatedByLocation2($this->aLocationRelatedByLocation2); } if ($this->isModified()) { if ($this->isNew()) { $pk = VTestApplSchedPeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += VTestApplSchedPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }