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