Exemple #1
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;
 }
 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);
     }
     EscalanotaPeer::addSelectColumns($c);
     $startcol2 = EscalanotaPeer::NUM_COLUMNS - EscalanotaPeer::NUM_LAZY_LOAD_COLUMNS;
     EstablecimientoPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (EstablecimientoPeer::NUM_COLUMNS - EstablecimientoPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(EscalanotaPeer::FK_ESTABLECIMIENTO_ID), array(EstablecimientoPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = EscalanotaPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = EscalanotaPeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = EscalanotaPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             EscalanotaPeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = EstablecimientoPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = EstablecimientoPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = EstablecimientoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 EstablecimientoPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addEscalanota($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }