/** * Filter the query by a related \gossi\trixionary\model\Sport object * * @param \gossi\trixionary\model\Sport|ObjectCollection $sport The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildSkillQuery The current query, for fluid interface */ public function filterBySport($sport, $comparison = null) { if ($sport instanceof \gossi\trixionary\model\Sport) { return $this->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->getId(), $comparison); } elseif ($sport instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBySport() only accepts arguments of type \\gossi\\trixionary\\model\\Sport or Collection'); } }