/** * Filter the query by a related \gossi\trixionary\model\Group object * * @param \gossi\trixionary\model\Group|ObjectCollection $group 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 filterByGroup($group, $comparison = null) { if ($group instanceof \gossi\trixionary\model\Group) { return $this->addUsingAlias(SportTableMap::COL_ID, $group->getSportId(), $comparison); } elseif ($group instanceof ObjectCollection) { return $this->useGroupQuery()->filterByPrimaryKeys($group->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByGroup() only accepts arguments of type \\gossi\\trixionary\\model\\Group or Collection'); } }