コード例 #1
0
ファイル: CountryQuery.php プロジェクト: alex63530/thelia
 /**
  * Filter the query by a related \Thelia\Model\OrderAddress object
  *
  * @param \Thelia\Model\OrderAddress|ObjectCollection $orderAddress  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCountryQuery The current query, for fluid interface
  */
 public function filterByOrderAddress($orderAddress, $comparison = null)
 {
     if ($orderAddress instanceof \Thelia\Model\OrderAddress) {
         return $this->addUsingAlias(CountryTableMap::ID, $orderAddress->getCountryId(), $comparison);
     } elseif ($orderAddress instanceof ObjectCollection) {
         return $this->useOrderAddressQuery()->filterByPrimaryKeys($orderAddress->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByOrderAddress() only accepts arguments of type \\Thelia\\Model\\OrderAddress or Collection');
     }
 }