示例#1
0
 /**
  * Filter the query by a related \Thelia\Model\Cart object
  *
  * @param \Thelia\Model\Cart|ObjectCollection $cart  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildAddressQuery The current query, for fluid interface
  */
 public function filterByCartRelatedByAddressDeliveryId($cart, $comparison = null)
 {
     if ($cart instanceof \Thelia\Model\Cart) {
         return $this->addUsingAlias(AddressTableMap::ID, $cart->getAddressDeliveryId(), $comparison);
     } elseif ($cart instanceof ObjectCollection) {
         return $this->useCartRelatedByAddressDeliveryIdQuery()->filterByPrimaryKeys($cart->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCartRelatedByAddressDeliveryId() only accepts arguments of type \\Thelia\\Model\\Cart or Collection');
     }
 }