Esempio n. 1
0
 /**
  * Filter the query by a related \Thelia\Model\SaleOffsetCurrency object
  *
  * @param \Thelia\Model\SaleOffsetCurrency|ObjectCollection $saleOffsetCurrency  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCurrencyQuery The current query, for fluid interface
  */
 public function filterBySaleOffsetCurrency($saleOffsetCurrency, $comparison = null)
 {
     if ($saleOffsetCurrency instanceof \Thelia\Model\SaleOffsetCurrency) {
         return $this->addUsingAlias(CurrencyTableMap::ID, $saleOffsetCurrency->getCurrencyId(), $comparison);
     } elseif ($saleOffsetCurrency instanceof ObjectCollection) {
         return $this->useSaleOffsetCurrencyQuery()->filterByPrimaryKeys($saleOffsetCurrency->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterBySaleOffsetCurrency() only accepts arguments of type \\Thelia\\Model\\SaleOffsetCurrency or Collection');
     }
 }
Esempio n. 2
0
 /**
  * Filter the query by a related \keeko\core\model\Country object
  *
  * @param \keeko\core\model\Country|ObjectCollection $country the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCurrencyQuery The current query, for fluid interface
  */
 public function filterByCountry($country, $comparison = null)
 {
     if ($country instanceof \keeko\core\model\Country) {
         return $this->addUsingAlias(CurrencyTableMap::COL_ID, $country->getCurrencyId(), $comparison);
     } elseif ($country instanceof ObjectCollection) {
         return $this->useCountryQuery()->filterByPrimaryKeys($country->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCountry() only accepts arguments of type \\keeko\\core\\model\\Country or Collection');
     }
 }