public static function doSelectJoinAllExceptEvento(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     RelDivisionActividadDocentePeer::addSelectColumns($c);
     $startcol2 = RelDivisionActividadDocentePeer::NUM_COLUMNS - RelDivisionActividadDocentePeer::NUM_LAZY_LOAD_COLUMNS;
     DivisionPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (DivisionPeer::NUM_COLUMNS - DivisionPeer::NUM_LAZY_LOAD_COLUMNS);
     ActividadPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (ActividadPeer::NUM_COLUMNS - ActividadPeer::NUM_LAZY_LOAD_COLUMNS);
     DocentePeer::addSelectColumns($c);
     $startcol5 = $startcol4 + (DocentePeer::NUM_COLUMNS - DocentePeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(RelDivisionActividadDocentePeer::FK_DIVISION_ID), array(DivisionPeer::ID), $join_behavior);
     $c->addJoin(array(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID), array(ActividadPeer::ID), $join_behavior);
     $c->addJoin(array(RelDivisionActividadDocentePeer::FK_DOCENTE_ID), array(DocentePeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = RelDivisionActividadDocentePeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = RelDivisionActividadDocentePeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = RelDivisionActividadDocentePeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             RelDivisionActividadDocentePeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = DivisionPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = DivisionPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = DivisionPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 DivisionPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addRelDivisionActividadDocente($obj1);
         }
         $key3 = ActividadPeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = ActividadPeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = ActividadPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 ActividadPeer::addInstanceToPool($obj3, $key3);
             }
             $obj3->addRelDivisionActividadDocente($obj1);
         }
         $key4 = DocentePeer::getPrimaryKeyHashFromRow($row, $startcol4);
         if ($key4 !== null) {
             $obj4 = DocentePeer::getInstanceFromPool($key4);
             if (!$obj4) {
                 $omClass = DocentePeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj4 = new $cls();
                 $obj4->hydrate($row, $startcol4);
                 DocentePeer::addInstanceToPool($obj4, $key4);
             }
             $obj4->addRelDivisionActividadDocente($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }
Beispiel #2
0
 public static function doSelectJoinAllExceptOrientacion(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     DivisionPeer::addSelectColumns($c);
     $startcol2 = DivisionPeer::NUM_COLUMNS - DivisionPeer::NUM_LAZY_LOAD_COLUMNS;
     AnioPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + (AnioPeer::NUM_COLUMNS - AnioPeer::NUM_LAZY_LOAD_COLUMNS);
     TurnoPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + (TurnoPeer::NUM_COLUMNS - TurnoPeer::NUM_LAZY_LOAD_COLUMNS);
     $c->addJoin(array(DivisionPeer::FK_ANIO_ID), array(AnioPeer::ID), $join_behavior);
     $c->addJoin(array(DivisionPeer::FK_TURNO_ID), array(TurnoPeer::ID), $join_behavior);
     $stmt = BasePeer::doSelect($c, $con);
     $results = array();
     while ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $key1 = DivisionPeer::getPrimaryKeyHashFromRow($row, 0);
         if (null !== ($obj1 = DivisionPeer::getInstanceFromPool($key1))) {
         } else {
             $omClass = DivisionPeer::getOMClass();
             $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
             $obj1 = new $cls();
             $obj1->hydrate($row);
             DivisionPeer::addInstanceToPool($obj1, $key1);
         }
         $key2 = AnioPeer::getPrimaryKeyHashFromRow($row, $startcol2);
         if ($key2 !== null) {
             $obj2 = AnioPeer::getInstanceFromPool($key2);
             if (!$obj2) {
                 $omClass = AnioPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj2 = new $cls();
                 $obj2->hydrate($row, $startcol2);
                 AnioPeer::addInstanceToPool($obj2, $key2);
             }
             $obj2->addDivision($obj1);
         }
         $key3 = TurnoPeer::getPrimaryKeyHashFromRow($row, $startcol3);
         if ($key3 !== null) {
             $obj3 = TurnoPeer::getInstanceFromPool($key3);
             if (!$obj3) {
                 $omClass = TurnoPeer::getOMClass();
                 $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1);
                 $obj3 = new $cls();
                 $obj3->hydrate($row, $startcol3);
                 TurnoPeer::addInstanceToPool($obj3, $key3);
             }
             $obj3->addDivision($obj1);
         }
         $results[] = $obj1;
     }
     $stmt->closeCursor();
     return $results;
 }