Example #1
0
 /**
  * Declares an association between this object and a ChildInseeGeoRegion object.
  *
  * @param                  ChildInseeGeoRegion $v
  * @return                 \INSEEGeo\Model\InseeGeoMunicipality The current object (for fluent API support)
  * @throws PropelException
  */
 public function setInseeGeoRegion(ChildInseeGeoRegion $v = null)
 {
     if ($v === null) {
         $this->setRegionId(NULL);
     } else {
         $this->setRegionId($v->getId());
     }
     $this->aInseeGeoRegion = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildInseeGeoRegion object, it will not be re-added.
     if ($v !== null) {
         $v->addInseeGeoMunicipality($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \INSEEGeo\Model\InseeGeoRegion object
  *
  * @param \INSEEGeo\Model\InseeGeoRegion|ObjectCollection $inseeGeoRegion The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildInseeGeoDepartmentQuery The current query, for fluid interface
  */
 public function filterByInseeGeoRegion($inseeGeoRegion, $comparison = null)
 {
     if ($inseeGeoRegion instanceof \INSEEGeo\Model\InseeGeoRegion) {
         return $this->addUsingAlias(InseeGeoDepartmentTableMap::REGION_ID, $inseeGeoRegion->getId(), $comparison);
     } elseif ($inseeGeoRegion instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(InseeGeoDepartmentTableMap::REGION_ID, $inseeGeoRegion->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByInseeGeoRegion() only accepts arguments of type \\INSEEGeo\\Model\\InseeGeoRegion or Collection');
     }
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildInseeGeoRegion $inseeGeoRegion Object to remove from the list of results
  *
  * @return ChildInseeGeoRegionQuery The current query, for fluid interface
  */
 public function prune($inseeGeoRegion = null)
 {
     if ($inseeGeoRegion) {
         $this->addUsingAlias(InseeGeoRegionTableMap::ID, $inseeGeoRegion->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }