/** * Selects a collection of CampPassenger objects pre-filled with all related objects except Camp. * * @param Criteria $c * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return array Array of CampPassenger objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptCamp(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { foreach (sfMixer::getCallables('BaseCampPassengerPeer:doSelectJoinAllExcept:doSelectJoinAllExcept') as $callable) { call_user_func($callable, 'BaseCampPassengerPeer', $c, $con); } $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } CampPassengerPeer::addSelectColumns($c); $startcol2 = CampPassengerPeer::NUM_COLUMNS - CampPassengerPeer::NUM_LAZY_LOAD_COLUMNS; PassengerPeer::addSelectColumns($c); $startcol3 = $startcol2 + (PassengerPeer::NUM_COLUMNS - PassengerPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(CampPassengerPeer::PASSENGER_ID), array(PassengerPeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = CampPassengerPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = CampPassengerPeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://propel.phpdb.org/trac/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $omClass = CampPassengerPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); CampPassengerPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined Passenger rows $key2 = PassengerPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = PassengerPeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = PassengerPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); PassengerPeer::addInstanceToPool($obj2, $key2); } // if $obj2 already loaded // Add the $obj1 (CampPassenger) to the collection in $obj2 (Passenger) $obj2->addCampPassenger($obj1); } // if joined row is not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }
/** * Gets an array of Passenger objects which contain a foreign key that references this object. * * If this collection has already been initialized with an identical Criteria, it returns the collection. * Otherwise if this PassengerIllnessCategory has previously been saved, it will retrieve * related Passengers from storage. If this PassengerIllnessCategory is new, it will return * an empty collection or the current collection, the criteria is ignored on a new object. * * @param PropelPDO $con * @param Criteria $criteria * @return array Passenger[] * @throws PropelException */ public function getPassengers($criteria = null, PropelPDO $con = null) { if ($criteria === null) { $criteria = new Criteria(PassengerIllnessCategoryPeer::DATABASE_NAME); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collPassengers === null) { if ($this->isNew()) { $this->collPassengers = array(); } else { $criteria->add(PassengerPeer::PASSENGER_ILLNESS_CATEGORY_ID, $this->id); PassengerPeer::addSelectColumns($criteria); $this->collPassengers = PassengerPeer::doSelect($criteria, $con); } } else { // criteria has no effect for a new object if (!$this->isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. $criteria->add(PassengerPeer::PASSENGER_ILLNESS_CATEGORY_ID, $this->id); PassengerPeer::addSelectColumns($criteria); if (!isset($this->lastPassengerCriteria) || !$this->lastPassengerCriteria->equals($criteria)) { $this->collPassengers = PassengerPeer::doSelect($criteria, $con); } } } $this->lastPassengerCriteria = $criteria; return $this->collPassengers; }
/** * Selects a collection of Mission objects pre-filled with all related objects except Coordinator. * * @param Criteria $c * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return array Array of Mission objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptCoordinator(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } MissionPeer::addSelectColumns($c); $startcol2 = MissionPeer::NUM_COLUMNS - MissionPeer::NUM_LAZY_LOAD_COLUMNS; MissionRequestPeer::addSelectColumns($c); $startcol3 = $startcol2 + (MissionRequestPeer::NUM_COLUMNS - MissionRequestPeer::NUM_LAZY_LOAD_COLUMNS); ItineraryPeer::addSelectColumns($c); $startcol4 = $startcol3 + (ItineraryPeer::NUM_COLUMNS - ItineraryPeer::NUM_LAZY_LOAD_COLUMNS); MissionTypePeer::addSelectColumns($c); $startcol5 = $startcol4 + (MissionTypePeer::NUM_COLUMNS - MissionTypePeer::NUM_LAZY_LOAD_COLUMNS); PassengerPeer::addSelectColumns($c); $startcol6 = $startcol5 + (PassengerPeer::NUM_COLUMNS - PassengerPeer::NUM_LAZY_LOAD_COLUMNS); RequesterPeer::addSelectColumns($c); $startcol7 = $startcol6 + (RequesterPeer::NUM_COLUMNS - RequesterPeer::NUM_LAZY_LOAD_COLUMNS); AgencyPeer::addSelectColumns($c); $startcol8 = $startcol7 + (AgencyPeer::NUM_COLUMNS - AgencyPeer::NUM_LAZY_LOAD_COLUMNS); RequesterPeer::addSelectColumns($c); $startcol9 = $startcol8 + (RequesterPeer::NUM_COLUMNS - RequesterPeer::NUM_LAZY_LOAD_COLUMNS); AgencyPeer::addSelectColumns($c); $startcol10 = $startcol9 + (AgencyPeer::NUM_COLUMNS - AgencyPeer::NUM_LAZY_LOAD_COLUMNS); CampPeer::addSelectColumns($c); $startcol11 = $startcol10 + (CampPeer::NUM_COLUMNS - CampPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(MissionPeer::REQUEST_ID), array(MissionRequestPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::ITINERARY_ID), array(ItineraryPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::MISSION_TYPE_ID), array(MissionTypePeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::PASSENGER_ID), array(PassengerPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::REQUESTER_ID), array(RequesterPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::AGENCY_ID), array(AgencyPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::OTHER_REQUESTER_ID), array(RequesterPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::OTHER_AGENCY_ID), array(AgencyPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::CAMP_ID), array(CampPeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = MissionPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = MissionPeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://propel.phpdb.org/trac/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $omClass = MissionPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); MissionPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined MissionRequest rows $key2 = MissionRequestPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = MissionRequestPeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = MissionRequestPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); MissionRequestPeer::addInstanceToPool($obj2, $key2); } // if $obj2 already loaded // Add the $obj1 (Mission) to the collection in $obj2 (MissionRequest) $obj2->addMission($obj1); } // if joined row is not null // Add objects for joined Itinerary rows $key3 = ItineraryPeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { $obj3 = ItineraryPeer::getInstanceFromPool($key3); if (!$obj3) { $omClass = ItineraryPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); ItineraryPeer::addInstanceToPool($obj3, $key3); } // if $obj3 already loaded // Add the $obj1 (Mission) to the collection in $obj3 (Itinerary) $obj3->addMission($obj1); } // if joined row is not null // Add objects for joined MissionType rows $key4 = MissionTypePeer::getPrimaryKeyHashFromRow($row, $startcol4); if ($key4 !== null) { $obj4 = MissionTypePeer::getInstanceFromPool($key4); if (!$obj4) { $omClass = MissionTypePeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj4 = new $cls(); $obj4->hydrate($row, $startcol4); MissionTypePeer::addInstanceToPool($obj4, $key4); } // if $obj4 already loaded // Add the $obj1 (Mission) to the collection in $obj4 (MissionType) $obj4->addMission($obj1); } // if joined row is not null // Add objects for joined Passenger rows $key5 = PassengerPeer::getPrimaryKeyHashFromRow($row, $startcol5); if ($key5 !== null) { $obj5 = PassengerPeer::getInstanceFromPool($key5); if (!$obj5) { $omClass = PassengerPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj5 = new $cls(); $obj5->hydrate($row, $startcol5); PassengerPeer::addInstanceToPool($obj5, $key5); } // if $obj5 already loaded // Add the $obj1 (Mission) to the collection in $obj5 (Passenger) $obj5->addMission($obj1); } // if joined row is not null // Add objects for joined Requester rows $key6 = RequesterPeer::getPrimaryKeyHashFromRow($row, $startcol6); if ($key6 !== null) { $obj6 = RequesterPeer::getInstanceFromPool($key6); if (!$obj6) { $omClass = RequesterPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj6 = new $cls(); $obj6->hydrate($row, $startcol6); RequesterPeer::addInstanceToPool($obj6, $key6); } // if $obj6 already loaded // Add the $obj1 (Mission) to the collection in $obj6 (Requester) $obj6->addMissionRelatedByRequesterId($obj1); } // if joined row is not null // Add objects for joined Agency rows $key7 = AgencyPeer::getPrimaryKeyHashFromRow($row, $startcol7); if ($key7 !== null) { $obj7 = AgencyPeer::getInstanceFromPool($key7); if (!$obj7) { $omClass = AgencyPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj7 = new $cls(); $obj7->hydrate($row, $startcol7); AgencyPeer::addInstanceToPool($obj7, $key7); } // if $obj7 already loaded // Add the $obj1 (Mission) to the collection in $obj7 (Agency) $obj7->addMissionRelatedByAgencyId($obj1); } // if joined row is not null // Add objects for joined Requester rows $key8 = RequesterPeer::getPrimaryKeyHashFromRow($row, $startcol8); if ($key8 !== null) { $obj8 = RequesterPeer::getInstanceFromPool($key8); if (!$obj8) { $omClass = RequesterPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj8 = new $cls(); $obj8->hydrate($row, $startcol8); RequesterPeer::addInstanceToPool($obj8, $key8); } // if $obj8 already loaded // Add the $obj1 (Mission) to the collection in $obj8 (Requester) $obj8->addMissionRelatedByOtherRequesterId($obj1); } // if joined row is not null // Add objects for joined Agency rows $key9 = AgencyPeer::getPrimaryKeyHashFromRow($row, $startcol9); if ($key9 !== null) { $obj9 = AgencyPeer::getInstanceFromPool($key9); if (!$obj9) { $omClass = AgencyPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj9 = new $cls(); $obj9->hydrate($row, $startcol9); AgencyPeer::addInstanceToPool($obj9, $key9); } // if $obj9 already loaded // Add the $obj1 (Mission) to the collection in $obj9 (Agency) $obj9->addMissionRelatedByOtherAgencyId($obj1); } // if joined row is not null // Add objects for joined Camp rows $key10 = CampPeer::getPrimaryKeyHashFromRow($row, $startcol10); if ($key10 !== null) { $obj10 = CampPeer::getInstanceFromPool($key10); if (!$obj10) { $omClass = CampPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj10 = new $cls(); $obj10->hydrate($row, $startcol10); CampPeer::addInstanceToPool($obj10, $key10); } // if $obj10 already loaded // Add the $obj1 (Mission) to the collection in $obj10 (Camp) $obj10->addMission($obj1); } // if joined row is not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }
public static function doSelectJoinCustom(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { foreach (sfMixer::getCallables('MissionPeer:doSelectJoinCustom:doSelectJoinCustom') as $callable) { call_user_func($callable, 'MissionPeer', $c, $con); } $c = clone $c; // Set the correct dbName if it has not been overridden if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } MissionPeer::addSelectColumns($c); $startcol2 = MissionPeer::NUM_COLUMNS - MissionPeer::NUM_LAZY_LOAD_COLUMNS; ItineraryPeer::addSelectColumns($c); $startcol3 = $startcol2 + (ItineraryPeer::NUM_COLUMNS - ItineraryPeer::NUM_LAZY_LOAD_COLUMNS); MissionTypePeer::addSelectColumns($c); $startcol4 = $startcol3 + (MissionTypePeer::NUM_COLUMNS - MissionTypePeer::NUM_LAZY_LOAD_COLUMNS); PassengerPeer::addSelectColumns($c); $startcol5 = $startcol4 + (PassengerPeer::NUM_COLUMNS - PassengerPeer::NUM_LAZY_LOAD_COLUMNS); MissionLegPeer::addSelectColumns($c); $startcol6 = $startcol5 + (MissionLegPeer::NUM_COLUMNS - MissionLegPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(MissionPeer::ITINERARY_ID), array(ItineraryPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::MISSION_TYPE_ID), array(MissionTypePeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::PASSENGER_ID), array(PassengerPeer::ID), $join_behavior); $c->addJoin(array(MissionPeer::ID), array(MissionLegPeer::MISSION_ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = MissionPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = MissionPeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://propel.phpdb.org/trac/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $omClass = MissionPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); MissionPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined Itinerary rows $key2 = ItineraryPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = ItineraryPeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = ItineraryPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); ItineraryPeer::addInstanceToPool($obj2, $key2); } // if obj2 loaded // Add the $obj1 (Mission) to the collection in $obj3 (Itinerary) $obj2->addMission($obj1); } // if joined row not null // Add objects for joined MissionType rows $key3 = MissionTypePeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { $obj3 = MissionTypePeer::getInstanceFromPool($key3); if (!$obj3) { $omClass = MissionTypePeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); MissionTypePeer::addInstanceToPool($obj3, $key3); } // if obj3 loaded // Add the $obj1 (Mission) to the collection in $obj3 (MissionType) $obj3->addMission($obj1); } // if joined row not null // Add objects for joined Passenger rows $key4 = PassengerPeer::getPrimaryKeyHashFromRow($row, $startcol4); if ($key4 !== null) { $obj4 = PassengerPeer::getInstanceFromPool($key4); if (!$obj4) { $omClass = PassengerPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj4 = new $cls(); $obj4->hydrate($row, $startcol4); PassengerPeer::addInstanceToPool($obj4, $key4); } // if obj4 loaded // Add the $obj1 (Mission) to the collection in $obj4 (Passenger) $obj4->addMission($obj1); } // if joined row not null // Add objects for joined MissionLeg rows $key5 = MissionLegPeer::getPrimaryKeyHashFromRow($row, $startcol5); if ($key5 !== null) { $obj5 = MissionLegPeer::getInstanceFromPool($key5); if (!$obj5) { $omClass = MissionLegPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj5 = new $cls(); $obj5->hydrate($row, $startcol5); MissionLegPeer::addInstanceToPool($obj5, $key5); } // if obj5 loaded // Add the $obj1 (Mission) to the collection in $obj5 (MissionLeg) $obj5->setMission($obj1); } // if joined row not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }
/** * Selects a collection of Passenger objects pre-filled with all related objects except PassengerIllnessCategory. * * @param Criteria $c * @param PropelPDO $con * @param String $join_behavior the type of joins to use, defaults to Criteria::LEFT_JOIN * @return array Array of Passenger objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptPassengerIllnessCategory(Criteria $c, $con = null, $join_behavior = Criteria::LEFT_JOIN) { $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } PassengerPeer::addSelectColumns($c); $startcol2 = PassengerPeer::NUM_COLUMNS - PassengerPeer::NUM_LAZY_LOAD_COLUMNS; PersonPeer::addSelectColumns($c); $startcol3 = $startcol2 + (PersonPeer::NUM_COLUMNS - PersonPeer::NUM_LAZY_LOAD_COLUMNS); PassengerTypePeer::addSelectColumns($c); $startcol4 = $startcol3 + (PassengerTypePeer::NUM_COLUMNS - PassengerTypePeer::NUM_LAZY_LOAD_COLUMNS); RequesterPeer::addSelectColumns($c); $startcol5 = $startcol4 + (RequesterPeer::NUM_COLUMNS - RequesterPeer::NUM_LAZY_LOAD_COLUMNS); $c->addJoin(array(PassengerPeer::PERSON_ID), array(PersonPeer::ID), $join_behavior); $c->addJoin(array(PassengerPeer::PASSENGER_TYPE_ID), array(PassengerTypePeer::ID), $join_behavior); $c->addJoin(array(PassengerPeer::REQUESTER_ID), array(RequesterPeer::ID), $join_behavior); $stmt = BasePeer::doSelect($c, $con); $results = array(); while ($row = $stmt->fetch(PDO::FETCH_NUM)) { $key1 = PassengerPeer::getPrimaryKeyHashFromRow($row, 0); if (null !== ($obj1 = PassengerPeer::getInstanceFromPool($key1))) { // We no longer rehydrate the object, since this can cause data loss. // See http://propel.phpdb.org/trac/ticket/509 // $obj1->hydrate($row, 0, true); // rehydrate } else { $omClass = PassengerPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj1 = new $cls(); $obj1->hydrate($row); PassengerPeer::addInstanceToPool($obj1, $key1); } // if obj1 already loaded // Add objects for joined Person rows $key2 = PersonPeer::getPrimaryKeyHashFromRow($row, $startcol2); if ($key2 !== null) { $obj2 = PersonPeer::getInstanceFromPool($key2); if (!$obj2) { $omClass = PersonPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj2 = new $cls(); $obj2->hydrate($row, $startcol2); PersonPeer::addInstanceToPool($obj2, $key2); } // if $obj2 already loaded // Add the $obj1 (Passenger) to the collection in $obj2 (Person) $obj2->addPassenger($obj1); } // if joined row is not null // Add objects for joined PassengerType rows $key3 = PassengerTypePeer::getPrimaryKeyHashFromRow($row, $startcol3); if ($key3 !== null) { $obj3 = PassengerTypePeer::getInstanceFromPool($key3); if (!$obj3) { $omClass = PassengerTypePeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj3 = new $cls(); $obj3->hydrate($row, $startcol3); PassengerTypePeer::addInstanceToPool($obj3, $key3); } // if $obj3 already loaded // Add the $obj1 (Passenger) to the collection in $obj3 (PassengerType) $obj3->addPassenger($obj1); } // if joined row is not null // Add objects for joined Requester rows $key4 = RequesterPeer::getPrimaryKeyHashFromRow($row, $startcol4); if ($key4 !== null) { $obj4 = RequesterPeer::getInstanceFromPool($key4); if (!$obj4) { $omClass = RequesterPeer::getOMClass(); $cls = substr('.' . $omClass, strrpos('.' . $omClass, '.') + 1); $obj4 = new $cls(); $obj4->hydrate($row, $startcol4); RequesterPeer::addInstanceToPool($obj4, $key4); } // if $obj4 already loaded // Add the $obj1 (Passenger) to the collection in $obj4 (Requester) $obj4->addPassenger($obj1); } // if joined row is not null $results[] = $obj1; } $stmt->closeCursor(); return $results; }