/** * Filter the query by a related Kota object * * @param Kota|PropelObjectCollection $kota The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return CustomersQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByKota($kota, $comparison = null) { if ($kota instanceof Kota) { return $this->addUsingAlias(CustomersPeer::ID_KOTA, $kota->getId(), $comparison); } elseif ($kota instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CustomersPeer::ID_KOTA, $kota->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByKota() only accepts arguments of type Kota or PropelCollection'); } }