示例#1
0
 /**
  * Filter the query by a related \ORM\PurchaseHistory object
  *
  * @param \ORM\PurchaseHistory|ObjectCollection $purchaseHistory  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildUserDetailQuery The current query, for fluid interface
  */
 public function filterByPurchaseHistory($purchaseHistory, $comparison = null)
 {
     if ($purchaseHistory instanceof \ORM\PurchaseHistory) {
         return $this->addUsingAlias(UserDetailTableMap::COL_ID, $purchaseHistory->getUserId(), $comparison);
     } elseif ($purchaseHistory instanceof ObjectCollection) {
         return $this->usePurchaseHistoryQuery()->filterByPrimaryKeys($purchaseHistory->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByPurchaseHistory() only accepts arguments of type \\ORM\\PurchaseHistory or Collection');
     }
 }