/** * Filter the query by a related \Tag object * * @param \Tag|ObjectCollection $tag the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildVerseQuery The current query, for fluid interface */ public function filterByTag($tag, $comparison = null) { if ($tag instanceof \Tag) { return $this->addUsingAlias(VerseTableMap::COL_ID, $tag->getVerseId(), $comparison); } elseif ($tag instanceof ObjectCollection) { return $this->useTagQuery()->filterByPrimaryKeys($tag->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByTag() only accepts arguments of type \\Tag or Collection'); } }