示例#1
0
 /**
  * Filter the query by a related \Thelia\Model\Address object
  *
  * @param \Thelia\Model\Address|ObjectCollection $address The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCartQuery The current query, for fluid interface
  */
 public function filterByAddressRelatedByAddressInvoiceId($address, $comparison = null)
 {
     if ($address instanceof \Thelia\Model\Address) {
         return $this->addUsingAlias(CartTableMap::ADDRESS_INVOICE_ID, $address->getId(), $comparison);
     } elseif ($address instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CartTableMap::ADDRESS_INVOICE_ID, $address->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAddressRelatedByAddressInvoiceId() only accepts arguments of type \\Thelia\\Model\\Address or Collection');
     }
 }