public function getInboxEmpsRelatedByEmployee2($criteria = null, $con = null) { include_once 'lib/model/om/BaseInboxEmpPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collInboxEmpsRelatedByEmployee2 === null) { if ($this->isNew()) { $this->collInboxEmpsRelatedByEmployee2 = array(); } else { $criteria->add(InboxEmpPeer::EMPLOYEE_2, $this->getId()); InboxEmpPeer::addSelectColumns($criteria); $this->collInboxEmpsRelatedByEmployee2 = InboxEmpPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(InboxEmpPeer::EMPLOYEE_2, $this->getId()); InboxEmpPeer::addSelectColumns($criteria); if (!isset($this->lastInboxEmpRelatedByEmployee2Criteria) || !$this->lastInboxEmpRelatedByEmployee2Criteria->equals($criteria)) { $this->collInboxEmpsRelatedByEmployee2 = InboxEmpPeer::doSelect($criteria, $con); } } } $this->lastInboxEmpRelatedByEmployee2Criteria = $criteria; return $this->collInboxEmpsRelatedByEmployee2; }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(InboxEmpPeer::ID, $pks, Criteria::IN); $objs = InboxEmpPeer::doSelect($criteria, $con); } return $objs; }