/** * Filter the query by a related \Keyword object * * @param \Keyword|ObjectCollection $keyword 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 ChildTagQuery The current query, for fluid interface */ public function filterByKeyword($keyword, $comparison = null) { if ($keyword instanceof \Keyword) { return $this->addUsingAlias(TagTableMap::COL_KEYWORD_ID, $keyword->getId(), $comparison); } elseif ($keyword instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(TagTableMap::COL_KEYWORD_ID, $keyword->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByKeyword() only accepts arguments of type \\Keyword or Collection'); } }