コード例 #1
0
 protected function doSave(PropelPDO $con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aRelAnioActividad !== null) {
             if ($this->aRelAnioActividad->isModified() || $this->aRelAnioActividad->isNew()) {
                 $affectedRows += $this->aRelAnioActividad->save($con);
             }
             $this->setRelAnioActividad($this->aRelAnioActividad);
         }
         if ($this->aDocente !== null) {
             if ($this->aDocente->isModified() || $this->aDocente->isNew()) {
                 $affectedRows += $this->aDocente->save($con);
             }
             $this->setDocente($this->aDocente);
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = RelAnioActividadDocentePeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setNew(false);
             } else {
                 $affectedRows += RelAnioActividadDocentePeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }