Ejemplo n.º 1
0
 /**
  * Filter the query by a related \App\Propel\Order object
  *
  * @param \App\Propel\Order|ObjectCollection $order The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildOrderProductQuery The current query, for fluid interface
  */
 public function filterByOrder($order, $comparison = null)
 {
     if ($order instanceof \App\Propel\Order) {
         return $this->addUsingAlias(OrderProductTableMap::COL_ORDER_ID, $order->getOrderId(), $comparison);
     } elseif ($order instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderProductTableMap::COL_ORDER_ID, $order->toKeyValue('PrimaryKey', 'OrderId'), $comparison);
     } else {
         throw new PropelException('filterByOrder() only accepts arguments of type \\App\\Propel\\Order or Collection');
     }
 }
Ejemplo n.º 2
0
 /**
  * Filter the query by a related \Thelia\Model\OrderCoupon object
  *
  * @param \Thelia\Model\OrderCoupon|ObjectCollection $orderCoupon  the related object 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 filterByOrderCoupon($orderCoupon, $comparison = null)
 {
     if ($orderCoupon instanceof \Thelia\Model\OrderCoupon) {
         return $this->addUsingAlias(OrderTableMap::ID, $orderCoupon->getOrderId(), $comparison);
     } elseif ($orderCoupon instanceof ObjectCollection) {
         return $this->useOrderCouponQuery()->filterByPrimaryKeys($orderCoupon->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByOrderCoupon() only accepts arguments of type \\Thelia\\Model\\OrderCoupon or Collection');
     }
 }
Ejemplo n.º 3
0
 /**
  * Filter the query by a related \App\Propel\OrderProduct object
  *
  * @param \App\Propel\OrderProduct|ObjectCollection $orderProduct the related object 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 filterByOrderProduct($orderProduct, $comparison = null)
 {
     if ($orderProduct instanceof \App\Propel\OrderProduct) {
         return $this->addUsingAlias(OrderTableMap::COL_ORDER_ID, $orderProduct->getOrderId(), $comparison);
     } elseif ($orderProduct instanceof ObjectCollection) {
         return $this->useOrderProductQuery()->filterByPrimaryKeys($orderProduct->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByOrderProduct() only accepts arguments of type \\App\\Propel\\OrderProduct or Collection');
     }
 }