Example #1
0
 /**
  * Filter the query by a related \INSEEGeo\Model\InseeGeoDepartment object
  *
  * @param \INSEEGeo\Model\InseeGeoDepartment|ObjectCollection $inseeGeoDepartment  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildInseeGeoRegionQuery The current query, for fluid interface
  */
 public function filterByInseeGeoDepartment($inseeGeoDepartment, $comparison = null)
 {
     if ($inseeGeoDepartment instanceof \INSEEGeo\Model\InseeGeoDepartment) {
         return $this->addUsingAlias(InseeGeoRegionTableMap::ID, $inseeGeoDepartment->getRegionId(), $comparison);
     } elseif ($inseeGeoDepartment instanceof ObjectCollection) {
         return $this->useInseeGeoDepartmentQuery()->filterByPrimaryKeys($inseeGeoDepartment->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByInseeGeoDepartment() only accepts arguments of type \\INSEEGeo\\Model\\InseeGeoDepartment or Collection');
     }
 }