/** * Filter the query by a related LeasingAppointments object * * @param LeasingAppointments|PropelObjectCollection $leasingAppointments The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LeasingAppointmentAssignmentQuery 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(LeasingAppointmentAssignmentPeer::APPOINTMENTS_ID, $leasingAppointments->getId(), $comparison); } elseif ($leasingAppointments instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(LeasingAppointmentAssignmentPeer::APPOINTMENTS_ID, $leasingAppointments->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByLeasingAppointments() only accepts arguments of type LeasingAppointments or PropelCollection'); } }