protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aTestSchedule !== null) { if ($this->aTestSchedule->isModified()) { $affectedRows += $this->aTestSchedule->save($con); } $this->setTestSchedule($this->aTestSchedule); } if ($this->aLocation !== null) { if ($this->aLocation->isModified()) { $affectedRows += $this->aLocation->save($con); } $this->setLocation($this->aLocation); } if ($this->isModified()) { if ($this->isNew()) { $pk = VTestLocation1Peer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += VTestLocation1Peer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }