/** * Filter the query by a related \keeko\core\model\Continent object * * @param \keeko\core\model\Continent|ObjectCollection $continent The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildCountryQuery The current query, for fluid interface */ public function filterByContinent($continent, $comparison = null) { if ($continent instanceof \keeko\core\model\Continent) { return $this->addUsingAlias(CountryTableMap::COL_CONTINENT_ID, $continent->getId(), $comparison); } elseif ($continent instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CountryTableMap::COL_CONTINENT_ID, $continent->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByContinent() only accepts arguments of type \\keeko\\core\\model\\Continent or Collection'); } }