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