protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aAnswer !== null) { if ($this->aAnswer->isModified()) { $affectedRows += $this->aAnswer->save($con); } $this->setAnswer($this->aAnswer); } if ($this->aUser !== null) { if ($this->aUser->isModified()) { $affectedRows += $this->aUser->save($con); } $this->setUser($this->aUser); } if ($this->isModified()) { if ($this->isNew()) { $pk = ReportAnswerPeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += ReportAnswerPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }