/** * Filter the query by a related LeasingTenants object * * @param LeasingTenants|PropelObjectCollection $leasingTenants 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 filterByLeasingTenants($leasingTenants, $comparison = null) { if ($leasingTenants instanceof LeasingTenants) { return $this->addUsingAlias(LeasingUnitPeer::ID, $leasingTenants->getUnitId(), $comparison); } elseif ($leasingTenants instanceof PropelObjectCollection) { return $this->useLeasingTenantsQuery()->filterByPrimaryKeys($leasingTenants->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLeasingTenants() only accepts arguments of type LeasingTenants or PropelCollection'); } }