/** * Filter the query by a related UserSkill object * * @param UserSkill|PropelObjectCollection $userSkill the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return SkillQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByUserSkill($userSkill, $comparison = null) { if ($userSkill instanceof UserSkill) { return $this->addUsingAlias(SkillPeer::ID, $userSkill->getSkillId(), $comparison); } elseif ($userSkill instanceof PropelObjectCollection) { return $this->useUserSkillQuery()->filterByPrimaryKeys($userSkill->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByUserSkill() only accepts arguments of type UserSkill or PropelCollection'); } }