Beispiel #1
0
 protected function doSave($con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aQuestion !== null) {
             if ($this->aQuestion->isModified()) {
                 $affectedRows += $this->aQuestion->save($con);
             }
             $this->setQuestion($this->aQuestion);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = SearchIndexPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += SearchIndexPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }