Esempio n. 1
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Object object
  *
  * @param \gossi\trixionary\model\Object|ObjectCollection $object the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildSportQuery The current query, for fluid interface
  */
 public function filterByObject($object, $comparison = null)
 {
     if ($object instanceof \gossi\trixionary\model\Object) {
         return $this->addUsingAlias(SportTableMap::COL_ID, $object->getSportId(), $comparison);
     } elseif ($object instanceof ObjectCollection) {
         return $this->useObjectQuery()->filterByPrimaryKeys($object->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByObject() only accepts arguments of type \\gossi\\trixionary\\model\\Object or Collection');
     }
 }