Exemplo n.º 1
0
 /**
  * Declares an association between this object and a ChildRatings object.
  *
  * @param  ChildRatings $v
  * @return $this|\UserReviews The current object (for fluent API support)
  * @throws PropelException
  */
 public function setRatings(ChildRatings $v = null)
 {
     if ($v === null) {
         $this->setRating(NULL);
     } else {
         $this->setRating($v->getId());
     }
     $this->aRatings = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildRatings object, it will not be re-added.
     if ($v !== null) {
         $v->addUserReviews($this);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Filter the query by a related \Ratings object
  *
  * @param \Ratings|ObjectCollection $ratings 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 ChildUserReviewsQuery The current query, for fluid interface
  */
 public function filterByRatings($ratings, $comparison = null)
 {
     if ($ratings instanceof \Ratings) {
         return $this->addUsingAlias(UserReviewsTableMap::COL_RATING, $ratings->getId(), $comparison);
     } elseif ($ratings instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(UserReviewsTableMap::COL_RATING, $ratings->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByRatings() only accepts arguments of type \\Ratings or Collection');
     }
 }
Exemplo n.º 3
0
 /**
  * Exclude object from result
  *
  * @param   ChildRatings $ratings Object to remove from the list of results
  *
  * @return $this|ChildRatingsQuery The current query, for fluid interface
  */
 public function prune($ratings = null)
 {
     if ($ratings) {
         $this->addUsingAlias(RatingsTableMap::COL_ID, $ratings->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }