Exemple #1
0
 /**
  * Declares an association between this object and a ChildRegionType object.
  *
  * @param  ChildRegionType $v
  * @return $this|\keeko\core\model\Subdivision The current object (for fluent API support)
  * @throws PropelException
  */
 public function setType(ChildRegionType $v = null)
 {
     if ($v === null) {
         $this->setTypeId(NULL);
     } else {
         $this->setTypeId($v->getId());
     }
     $this->aType = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildRegionType object, it will not be re-added.
     if ($v !== null) {
         $v->addSubdivision($this);
     }
     return $this;
 }
Exemple #2
0
 /**
  * Filter the query by a related \keeko\core\model\RegionType object
  *
  * @param \keeko\core\model\RegionType|ObjectCollection $regionType 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 filterBySubtype($regionType, $comparison = null)
 {
     if ($regionType instanceof \keeko\core\model\RegionType) {
         return $this->addUsingAlias(CountryTableMap::COL_SUBTYPE_ID, $regionType->getId(), $comparison);
     } elseif ($regionType instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CountryTableMap::COL_SUBTYPE_ID, $regionType->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySubtype() only accepts arguments of type \\keeko\\core\\model\\RegionType or Collection');
     }
 }
Exemple #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildRegionType $regionType Object to remove from the list of results
  *
  * @return $this|ChildRegionTypeQuery The current query, for fluid interface
  */
 public function prune($regionType = null)
 {
     if ($regionType) {
         $this->addUsingAlias(RegionTypeTableMap::COL_ID, $regionType->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }