/** * Filter the query by a related \Thelia\Model\CouponCountry object * * @param \Thelia\Model\CouponCountry|ObjectCollection $couponCountry 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 filterByCouponCountry($couponCountry, $comparison = null) { if ($couponCountry instanceof \Thelia\Model\CouponCountry) { return $this->addUsingAlias(CouponTableMap::ID, $couponCountry->getCouponId(), $comparison); } elseif ($couponCountry instanceof ObjectCollection) { return $this->useCouponCountryQuery()->filterByPrimaryKeys($couponCountry->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByCouponCountry() only accepts arguments of type \\Thelia\\Model\\CouponCountry or Collection'); } }