Exemplo n.º 1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aGames) {
         $this->aGames->removeUserReviews($this);
     }
     if (null !== $this->aPlatforms) {
         $this->aPlatforms->removeUserReviews($this);
     }
     if (null !== $this->aUser) {
         $this->aUser->removeUserReviews($this);
     }
     if (null !== $this->aRatings) {
         $this->aRatings->removeUserReviews($this);
     }
     $this->id = null;
     $this->game_id = null;
     $this->platform_id = null;
     $this->user_id = null;
     $this->rig_id = null;
     $this->rating = null;
     $this->review = null;
     $this->upvotes = null;
     $this->downvotes = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
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;
 }