public static function populateObjects(PDOStatement $stmt) { $results = array(); $cls = LegajocategoriaPeer::getOMClass(); $cls = substr('.' . $cls, strrpos('.' . $cls, '.') + 1); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key = LegajocategoriaPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj = LegajocategoriaPeer::getInstanceFromPool($key))) { $results[] = $obj; } else { $obj = new $cls(); $obj->hydrate($row); $results[] = $obj; LegajocategoriaPeer::addInstanceToPool($obj, $key); } } $stmt->closeCursor(); return $results; }
public static function doSelectJoinAllExceptUsuario(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } LegajopedagogicoPeer::addSelectColumns($c); $startcol2 = LegajopedagogicoPeer::NUM_COLUMNS - LegajopedagogicoPeer::NUM_LAZY_LOAD_COLUMNS; AlumnoPeer::addSelectColumns($c); $startcol3 = $startcol2 + (AlumnoPeer::NUM_COLUMNS - AlumnoPeer::NUM_LAZY_LOAD_COLUMNS); LegajocategoriaPeer::addSelectColumns($c); $startcol4 = $startcol3 + (LegajocategoriaPeer::NUM_COLUMNS - LegajocategoriaPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(LegajopedagogicoPeer::FK_ALUMNO_ID), array(AlumnoPeer::ID), $join_behavior); $c->addJoin(array(LegajopedagogicoPeer::FK_LEGAJOCATEGORIA_ID), array(LegajocategoriaPeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = LegajopedagogicoPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = LegajopedagogicoPeer::getInstanceFromPool($key1))) { } else { $omClass = LegajopedagogicoPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); LegajopedagogicoPeer::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->addLegajopedagogico($obj1); } $key3 = LegajocategoriaPeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { $obj3 = LegajocategoriaPeer::getInstanceFromPool($key3); if (!$obj3) { $omClass = LegajocategoriaPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); LegajocategoriaPeer::addInstanceToPool($obj3, $key3); } $obj3->addLegajopedagogico($obj1); } $results[] = $obj1; } $stmt->closeCursor(); return $results; }