Пример #1
0
 protected function doSave(PropelPDO $con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aCiclolectivo !== null) {
             if ($this->aCiclolectivo->isModified() || $this->aCiclolectivo->isNew()) {
                 $affectedRows += $this->aCiclolectivo->save($con);
             }
             $this->setCiclolectivo($this->aCiclolectivo);
         }
         if ($this->isNew()) {
             $this->modifiedColumns[] = FeriadoPeer::ID;
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = FeriadoPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += FeriadoPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }