Ejemplo n.º 1
0
 /**
  * Filter the query by a related \Models\Pack object
  *
  * @param \Models\Pack|ObjectCollection $pack the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserQuery The current query, for fluid interface
  */
 public function filterByPack($pack, $comparison = null)
 {
     if ($pack instanceof \Models\Pack) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $pack->getOwnerId(), $comparison);
     } elseif ($pack instanceof ObjectCollection) {
         return $this->usePackQuery()->filterByPrimaryKeys($pack->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByPack() only accepts arguments of type \\Models\\Pack or Collection');
     }
 }