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