public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(TipoinformePeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(TipoinformePeer::DATABASE_NAME); $criteria->add(TipoinformePeer::ID, $pks, Criteria::IN); $objs = TipoinformePeer::doSelect($criteria, $con); } return $objs; }
public static function doSelectJoinAllExceptAdjunto(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } InformePeer::addSelectColumns($c); $startcol2 = InformePeer::NUM_COLUMNS - InformePeer::NUM_LAZY_LOAD_COLUMNS; TipoinformePeer::addSelectColumns($c); $startcol3 = $startcol2 + (TipoinformePeer::NUM_COLUMNS - TipoinformePeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(InformePeer::FK_TIPOINFORME_ID), array(TipoinformePeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = InformePeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = InformePeer::getInstanceFromPool($key1))) { } else { $omClass = InformePeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); InformePeer::addInstanceToPool($obj1, $key1); } $key2 = TipoinformePeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = TipoinformePeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = TipoinformePeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); TipoinformePeer::addInstanceToPool($obj2, $key2); } $obj2->addInforme($obj1); } $results[] = $obj1; } $stmt->closeCursor(); return $results; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = TipoinformePeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setNombre($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setDescripcion($arr[$keys[2]]); } }
public function getTipoinforme(PropelPDO $con = null) { if ($this->aTipoinforme === null && $this->fk_tipoinforme_id !== null) { $c = new Criteria(TipoinformePeer::DATABASE_NAME); $c->add(TipoinformePeer::ID, $this->fk_tipoinforme_id); $this->aTipoinforme = TipoinformePeer::doSelectOne($c, $con); } return $this->aTipoinforme; }