Beispiel #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 filterByCartRelatedByAddressInvoiceId($cart, $comparison = null)
 {
     if ($cart instanceof \Thelia\Model\Cart) {
         return $this->addUsingAlias(AddressTableMap::ID, $cart->getAddressInvoiceId(), $comparison);
     } elseif ($cart instanceof ObjectCollection) {
         return $this->useCartRelatedByAddressInvoiceIdQuery()->filterByPrimaryKeys($cart->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCartRelatedByAddressInvoiceId() only accepts arguments of type \\Thelia\\Model\\Cart or Collection');
     }
 }