Ejemplo n.º 1
0
 /**
  * Filter the query by a related LeasingAppointments object
  *
  * @param   LeasingAppointments|PropelObjectCollection $leasingAppointments  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 filterByLeasingAppointments($leasingAppointments, $comparison = null)
 {
     if ($leasingAppointments instanceof LeasingAppointments) {
         return $this->addUsingAlias(LeasingUnitPeer::ID, $leasingAppointments->getUnitId(), $comparison);
     } elseif ($leasingAppointments instanceof PropelObjectCollection) {
         return $this->useLeasingAppointmentsQuery()->filterByPrimaryKeys($leasingAppointments->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByLeasingAppointments() only accepts arguments of type LeasingAppointments or PropelCollection');
     }
 }