/** * Filter the query by a related \App\Propel\Variation object * * @param \App\Propel\Variation|ObjectCollection $variation the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildVariationTypeQuery The current query, for fluid interface */ public function filterByVariation($variation, $comparison = null) { if ($variation instanceof \App\Propel\Variation) { return $this->addUsingAlias(VariationTypeTableMap::COL_VARIATION_TYPE_ID, $variation->getVariationTypeId(), $comparison); } elseif ($variation instanceof ObjectCollection) { return $this->useVariationQuery()->filterByPrimaryKeys($variation->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByVariation() only accepts arguments of type \\App\\Propel\\Variation or Collection'); } }