protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->anahoWikiPage !== null) { if ($this->anahoWikiPage->isModified()) { $affectedRows += $this->anahoWikiPage->save($con); } $this->setnahoWikiPage($this->anahoWikiPage); } if ($this->anahoWikiContent !== null) { if ($this->anahoWikiContent->isModified()) { $affectedRows += $this->anahoWikiContent->save($con); } $this->setnahoWikiContent($this->anahoWikiContent); } if ($this->isModified()) { if ($this->isNew()) { $pk = nahoWikiRevisionPeer::doInsert($this, $con); $affectedRows += 1; $this->setNew(false); } else { $affectedRows += nahoWikiRevisionPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }