/** * 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'); } }
/** * Declares an association between this object and a ChildSport object. * * @param ChildSport $v * @return $this|\gossi\trixionary\model\Group The current object (for fluent API support) * @throws PropelException */ public function setSport(ChildSport $v = null) { if ($v === null) { $this->setSportId(NULL); } else { $this->setSportId($v->getId()); } $this->aSport = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildSport object, it will not be re-added. if ($v !== null) { $v->addGroup($this); } return $this; }
/** * Exclude object from result * * @param ChildSport $sport Object to remove from the list of results * * @return $this|ChildSportQuery The current query, for fluid interface */ public function prune($sport = null) { if ($sport) { $this->addUsingAlias(SportTableMap::COL_ID, $sport->getId(), Criteria::NOT_EQUAL); } return $this; }