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