Beispiel #1
0
 protected function doSave(PropelPDO $con)
 {
     $affectedRows = 0;
     if (!$this->alreadyInSave) {
         $this->alreadyInSave = true;
         if ($this->aAlumno !== null) {
             if ($this->aAlumno->isModified() || $this->aAlumno->isNew()) {
                 $affectedRows += $this->aAlumno->save($con);
             }
             $this->setAlumno($this->aAlumno);
         }
         if ($this->aUsuario !== null) {
             if ($this->aUsuario->isModified() || $this->aUsuario->isNew()) {
                 $affectedRows += $this->aUsuario->save($con);
             }
             $this->setUsuario($this->aUsuario);
         }
         if ($this->isNew()) {
             $this->modifiedColumns[] = LegajosaludPeer::ID;
         }
         if ($this->isModified()) {
             if ($this->isNew()) {
                 $pk = LegajosaludPeer::doInsert($this, $con);
                 $affectedRows += 1;
                 $this->setId($pk);
                 $this->setNew(false);
             } else {
                 $affectedRows += LegajosaludPeer::doUpdate($this, $con);
             }
             $this->resetModified();
         }
         $this->alreadyInSave = false;
     }
     return $affectedRows;
 }