예제 #1
0
 public static function doSelectJoinAll(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     AlumnoSaludPeer::addSelectColumns($c);
     $startcol2 = AlumnoSaludPeer::NUM_COLUMNS - AlumnoSaludPeer::NUM_LAZY_LOAD_COLUMNS;
     AlumnoPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (AlumnoPeer::NUM_COLUMNS - AlumnoPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(AlumnoSaludPeer::FK_ALUMNO_ID), array(AlumnoPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = AlumnoSaludPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = AlumnoSaludPeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = AlumnoSaludPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             AlumnoSaludPeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = AlumnoPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = AlumnoPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = AlumnoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 AlumnoPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addAlumnoSalud($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
예제 #2
0
 public static function doSelectJoinAllExceptPeriodo(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ExamenPeer::addSelectColumns($c);
     $startcol2 = ExamenPeer::NUM_COLUMNS - ExamenPeer::NUM_LAZY_LOAD_COLUMNS;
     EscalanotaPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (EscalanotaPeer::NUM_COLUMNS - EscalanotaPeer::NUM_LAZY_LOAD_COLUMNS);
     AlumnoPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (AlumnoPeer::NUM_COLUMNS - AlumnoPeer::NUM_LAZY_LOAD_COLUMNS);
     ActividadPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + (ActividadPeer::NUM_COLUMNS - ActividadPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(ExamenPeer::FK_ESCALANOTA_ID), array(EscalanotaPeer::ID), $join_behavior);
     $c->addJoin(array(ExamenPeer::FK_ALUMNO_ID), array(AlumnoPeer::ID), $join_behavior);
     $c->addJoin(array(ExamenPeer::FK_ACTIVIDAD_ID), array(ActividadPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = ExamenPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = ExamenPeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = ExamenPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             ExamenPeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = EscalanotaPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = EscalanotaPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = EscalanotaPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 EscalanotaPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addExamen($obj1);
         }
         $key3 = AlumnoPeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = AlumnoPeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = AlumnoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 AlumnoPeer::addInstanceToPool($obj3, $key3);
             }
             $obj3->addExamen($obj1);
         }
         $key4 = ActividadPeer::getPrimaryKeyHashFromRow($row, $startcol4);
         if ($key4 !== null) {
             $obj4 = ActividadPeer::getInstanceFromPool($key4);
             if (!$obj4) {
                 $omClass = ActividadPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj4 = new $cls();
                 $obj4->hydrate($row, $startcol4);
                 ActividadPeer::addInstanceToPool($obj4, $key4);
             }
             $obj4->addExamen($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
예제 #3
0
 public static function doSelectJoinAllExceptEstadosalumnos(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     AlumnoPeer::addSelectColumns($c);
     $startcol2 = AlumnoPeer::NUM_COLUMNS - AlumnoPeer::NUM_LAZY_LOAD_COLUMNS;
     ProvinciaPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (ProvinciaPeer::NUM_COLUMNS - ProvinciaPeer::NUM_LAZY_LOAD_COLUMNS);
     TipodocumentoPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (TipodocumentoPeer::NUM_COLUMNS - TipodocumentoPeer::NUM_LAZY_LOAD_COLUMNS);
     EstablecimientoPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + (EstablecimientoPeer::NUM_COLUMNS - EstablecimientoPeer::NUM_LAZY_LOAD_COLUMNS);
     CuentaPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + (CuentaPeer::NUM_COLUMNS - CuentaPeer::NUM_LAZY_LOAD_COLUMNS);
     ConceptobajaPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + (ConceptobajaPeer::NUM_COLUMNS - ConceptobajaPeer::NUM_LAZY_LOAD_COLUMNS);
     PaisPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + (PaisPeer::NUM_COLUMNS - PaisPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(AlumnoPeer::FK_PROVINCIA_ID), array(ProvinciaPeer::ID), $join_behavior);
     $c->addJoin(array(AlumnoPeer::FK_TIPODOCUMENTO_ID), array(TipodocumentoPeer::ID), $join_behavior);
     $c->addJoin(array(AlumnoPeer::FK_ESTABLECIMIENTO_ID), array(EstablecimientoPeer::ID), $join_behavior);
     $c->addJoin(array(AlumnoPeer::FK_CUENTA_ID), array(CuentaPeer::ID), $join_behavior);
     $c->addJoin(array(AlumnoPeer::FK_CONCEPTOBAJA_ID), array(ConceptobajaPeer::ID), $join_behavior);
     $c->addJoin(array(AlumnoPeer::FK_PAIS_ID), array(PaisPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = AlumnoPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = AlumnoPeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = AlumnoPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             AlumnoPeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = ProvinciaPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = ProvinciaPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = ProvinciaPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 ProvinciaPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addAlumno($obj1);
         }
         $key3 = TipodocumentoPeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = TipodocumentoPeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = TipodocumentoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 TipodocumentoPeer::addInstanceToPool($obj3, $key3);
             }
             $obj3->addAlumno($obj1);
         }
         $key4 = EstablecimientoPeer::getPrimaryKeyHashFromRow($row, $startcol4);
         if ($key4 !== null) {
             $obj4 = EstablecimientoPeer::getInstanceFromPool($key4);
             if (!$obj4) {
                 $omClass = EstablecimientoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj4 = new $cls();
                 $obj4->hydrate($row, $startcol4);
                 EstablecimientoPeer::addInstanceToPool($obj4, $key4);
             }
             $obj4->addAlumno($obj1);
         }
         $key5 = CuentaPeer::getPrimaryKeyHashFromRow($row, $startcol5);
         if ($key5 !== null) {
             $obj5 = CuentaPeer::getInstanceFromPool($key5);
             if (!$obj5) {
                 $omClass = CuentaPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj5 = new $cls();
                 $obj5->hydrate($row, $startcol5);
                 CuentaPeer::addInstanceToPool($obj5, $key5);
             }
             $obj5->addAlumno($obj1);
         }
         $key6 = ConceptobajaPeer::getPrimaryKeyHashFromRow($row, $startcol6);
         if ($key6 !== null) {
             $obj6 = ConceptobajaPeer::getInstanceFromPool($key6);
             if (!$obj6) {
                 $omClass = ConceptobajaPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj6 = new $cls();
                 $obj6->hydrate($row, $startcol6);
                 ConceptobajaPeer::addInstanceToPool($obj6, $key6);
             }
             $obj6->addAlumno($obj1);
         }
         $key7 = PaisPeer::getPrimaryKeyHashFromRow($row, $startcol7);
         if ($key7 !== null) {
             $obj7 = PaisPeer::getInstanceFromPool($key7);
             if (!$obj7) {
                 $omClass = PaisPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj7 = new $cls();
                 $obj7->hydrate($row, $startcol7);
                 PaisPeer::addInstanceToPool($obj7, $key7);
             }
             $obj7->addAlumno($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }