Beispiel #1
0
 /**
  * Filter the query by a related \App\Propel\Order object
  *
  * @param \App\Propel\Order|ObjectCollection $order the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildDeliveryQuery The current query, for fluid interface
  */
 public function filterByOrder($order, $comparison = null)
 {
     if ($order instanceof \App\Propel\Order) {
         return $this->addUsingAlias(DeliveryTableMap::COL_DELIVERY_ID, $order->getDeliveryId(), $comparison);
     } elseif ($order instanceof ObjectCollection) {
         return $this->useOrderQuery()->filterByPrimaryKeys($order->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByOrder() only accepts arguments of type \\App\\Propel\\Order or Collection');
     }
 }