예제 #1
0
 /**
  * Filter the query by a related LeasingPriceRange object
  *
  * @param   LeasingPriceRange|PropelObjectCollection $leasingPriceRange  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 LeasingUnitQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByLeasingPriceRange($leasingPriceRange, $comparison = null)
 {
     if ($leasingPriceRange instanceof LeasingPriceRange) {
         return $this->addUsingAlias(LeasingUnitPeer::ID, $leasingPriceRange->getUnitId(), $comparison);
     } elseif ($leasingPriceRange instanceof PropelObjectCollection) {
         return $this->useLeasingPriceRangeQuery()->filterByPrimaryKeys($leasingPriceRange->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLeasingPriceRange() only accepts arguments of type LeasingPriceRange or PropelCollection');
     }
 }