/** * Filter the query by a related \Thelia\Model\CouponVersion object * * @param \Thelia\Model\CouponVersion|ObjectCollection $couponVersion the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCouponQuery The current query, for fluid interface */ public function filterByCouponVersion($couponVersion, $comparison = null) { if ($couponVersion instanceof \Thelia\Model\CouponVersion) { return $this->addUsingAlias(CouponTableMap::ID, $couponVersion->getId(), $comparison); } elseif ($couponVersion instanceof ObjectCollection) { return $this->useCouponVersionQuery()->filterByPrimaryKeys($couponVersion->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByCouponVersion() only accepts arguments of type \\Thelia\\Model\\CouponVersion or Collection'); } }