/**
  * 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                 LeasingAppointmentLeadsQuery 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(LeasingAppointmentLeadsPeer::ID, $leasingAppointments->getAppointmentLeadsId(), $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');
     }
 }