/**
  * Filter the query by a related \GoogleShopping\Model\Thelia\Model\Currency object
  *
  * @param \GoogleShopping\Model\Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildGoogleshoppingAccountQuery The current query, for fluid interface
  */
 public function filterByCurrency($currency, $comparison = null)
 {
     if ($currency instanceof \GoogleShopping\Model\Thelia\Model\Currency) {
         return $this->addUsingAlias(GoogleshoppingAccountTableMap::DEFAULT_CURRENCY_ID, $currency->getId(), $comparison);
     } elseif ($currency instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(GoogleshoppingAccountTableMap::DEFAULT_CURRENCY_ID, $currency->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCurrency() only accepts arguments of type \\GoogleShopping\\Model\\Thelia\\Model\\Currency or Collection');
     }
 }
 /**
  * Declares an association between this object and a ChildCurrency object.
  *
  * @param                  ChildCurrency $v
  * @return                 \GoogleShopping\Model\GoogleshoppingAccount The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCurrency(ChildCurrency $v = null)
 {
     if ($v === null) {
         $this->setDefaultCurrencyId(NULL);
     } else {
         $this->setDefaultCurrencyId($v->getId());
     }
     $this->aCurrency = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCurrency object, it will not be re-added.
     if ($v !== null) {
         $v->addGoogleshoppingAccount($this);
     }
     return $this;
 }