public static function populateObjects(PDOStatement $stmt) { $results = array(); $cls = TipoasistenciaPeer::getOMClass(); $cls = substr('.' . $cls, strrpos('.' . $cls, '.') + 1); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key = TipoasistenciaPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj = TipoasistenciaPeer::getInstanceFromPool($key))) { $results[] = $obj; } else { $obj = new $cls(); $obj->hydrate($row); $results[] = $obj; TipoasistenciaPeer::addInstanceToPool($obj, $key); } } $stmt->closeCursor(); return $results; }
public static function doSelectJoinAllExceptAlumno(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } AsistenciaPeer::addSelectColumns($c); $startcol2 = AsistenciaPeer::NUM_COLUMNS - AsistenciaPeer::NUM_LAZY_LOAD_COLUMNS; TipoasistenciaPeer::addSelectColumns($c); $startcol3 = $startcol2 + (TipoasistenciaPeer::NUM_COLUMNS - TipoasistenciaPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(AsistenciaPeer::FK_TIPOASISTENCIA_ID), array(TipoasistenciaPeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = AsistenciaPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = AsistenciaPeer::getInstanceFromPool($key1))) { } else { $omClass = AsistenciaPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); AsistenciaPeer::addInstanceToPool($obj1, $key1); } $key2 = TipoasistenciaPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = TipoasistenciaPeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = TipoasistenciaPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); TipoasistenciaPeer::addInstanceToPool($obj2, $key2); } $obj2->addAsistencia($obj1); } $results[] = $obj1; } $stmt->closeCursor(); return $results; }