コード例 #1
0
 /**
  * Filter the query by a related \CategoryOption object
  *
  * @param \CategoryOption|ObjectCollection $categoryOption 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 ChildRatingValueQuery The current query, for fluid interface
  */
 public function filterByCategoryOption($categoryOption, $comparison = null)
 {
     if ($categoryOption instanceof \CategoryOption) {
         return $this->addUsingAlias(RatingValueTableMap::COL_CATEGORY_OPTION_ID, $categoryOption->getId(), $comparison);
     } elseif ($categoryOption instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(RatingValueTableMap::COL_CATEGORY_OPTION_ID, $categoryOption->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCategoryOption() only accepts arguments of type \\CategoryOption or Collection');
     }
 }
コード例 #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildCategoryOption $categoryOption Object to remove from the list of results
  *
  * @return $this|ChildCategoryOptionQuery The current query, for fluid interface
  */
 public function prune($categoryOption = null)
 {
     if ($categoryOption) {
         $this->addUsingAlias(CategoryOptionTableMap::COL_ID, $categoryOption->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #3
0
ファイル: RatingValue.php プロジェクト: pcmasteratings/site
 /**
  * Declares an association between this object and a ChildCategoryOption object.
  *
  * @param  ChildCategoryOption $v
  * @return $this|\RatingValue The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCategoryOption(ChildCategoryOption $v = null)
 {
     if ($v === null) {
         $this->setCategoryOptionId(NULL);
     } else {
         $this->setCategoryOptionId($v->getId());
     }
     $this->aCategoryOption = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCategoryOption object, it will not be re-added.
     if ($v !== null) {
         $v->addRatingValue($this);
     }
     return $this;
 }