/** * Filter the query by a related Kota object * * @param Kota|PropelObjectCollection $kota the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return PropinsiQuery 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(PropinsiPeer::ID, $kota->getIdPropinsi(), $comparison); } elseif ($kota instanceof PropelObjectCollection) { return $this->useKotaQuery()->filterByPrimaryKeys($kota->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByKota() only accepts arguments of type Kota or PropelCollection'); } }