Example #1
0
 /**
  * Filter the query by a related \keeko\core\model\Country object
  *
  * @param \keeko\core\model\Country|ObjectCollection $country 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 filterByCountryRelatedBySovereignityId($country, $comparison = null)
 {
     if ($country instanceof \keeko\core\model\Country) {
         return $this->addUsingAlias(CountryTableMap::COL_SOVEREIGNITY_ID, $country->getId(), $comparison);
     } elseif ($country instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CountryTableMap::COL_SOVEREIGNITY_ID, $country->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCountryRelatedBySovereignityId() only accepts arguments of type \\keeko\\core\\model\\Country or Collection');
     }
 }