protected function doSave($con) { $affectedRows = 0; if (!$this->alreadyInSave) { $this->alreadyInSave = true; if ($this->aWebPageTemplates !== null) { if ($this->aWebPageTemplates->isModified()) { $affectedRows += $this->aWebPageTemplates->save($con); } $this->setWebPageTemplates($this->aWebPageTemplates); } if ($this->aWebMenuType !== null) { if ($this->aWebMenuType->isModified()) { $affectedRows += $this->aWebMenuType->save($con); } $this->setWebMenuType($this->aWebMenuType); } if ($this->aWebComponent !== null) { if ($this->aWebComponent->isModified()) { $affectedRows += $this->aWebComponent->save($con); } $this->setWebComponent($this->aWebComponent); } if ($this->isModified()) { if ($this->isNew()) { $pk = WebMenuPeer::doInsert($this, $con); $affectedRows += 1; $this->setId($pk); $this->setNew(false); } else { $affectedRows += WebMenuPeer::doUpdate($this, $con); } $this->resetModified(); } $this->alreadyInSave = false; } return $affectedRows; }