/** * Filter the query by a related SearchIndex object * * @param SearchIndex|PropelObjectCollection $searchIndex The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return SearchIndexWordQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterBySearchIndex($searchIndex, $comparison = null) { if ($searchIndex instanceof SearchIndex) { return $this->addUsingAlias(SearchIndexWordPeer::SEARCH_INDEX_ID, $searchIndex->getId(), $comparison); } elseif ($searchIndex instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SearchIndexWordPeer::SEARCH_INDEX_ID, $searchIndex->toKeyValue('Id', 'Id'), $comparison); } else { throw new PropelException('filterBySearchIndex() only accepts arguments of type SearchIndex or PropelCollection'); } }