Exemplo n.º 1
0
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     refGenRegionPeer::addSelectColumns($c);
     $startcol2 = refGenRegionPeer::NUM_COLUMNS - refGenRegionPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = refGenRegionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $results[] = $obj1;
     }
     return $results;
 }
Exemplo n.º 2
0
 public function getrefGenRegionsRelatedByParent($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaserefGenRegionPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collrefGenRegionsRelatedByParent === null) {
         if ($this->isNew()) {
             $this->collrefGenRegionsRelatedByParent = array();
         } else {
             $criteria->add(refGenRegionPeer::PARENT, $this->getId());
             refGenRegionPeer::addSelectColumns($criteria);
             $this->collrefGenRegionsRelatedByParent = refGenRegionPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(refGenRegionPeer::PARENT, $this->getId());
             refGenRegionPeer::addSelectColumns($criteria);
             if (!isset($this->lastrefGenRegionRelatedByParentCriteria) || !$this->lastrefGenRegionRelatedByParentCriteria->equals($criteria)) {
                 $this->collrefGenRegionsRelatedByParent = refGenRegionPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastrefGenRegionRelatedByParentCriteria = $criteria;
     return $this->collrefGenRegionsRelatedByParent;
 }