/** * Declares an association between this object and a ChildGames object. * * @param ChildGames $v * @return $this|\UserReviews The current object (for fluent API support) * @throws PropelException */ public function setGames(ChildGames $v = null) { if ($v === null) { $this->setGameId(NULL); } else { $this->setGameId($v->getId()); } $this->aGames = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildGames object, it will not be re-added. if ($v !== null) { $v->addUserReviews($this); } return $this; }
/** * Filter the query by a related \Games object * * @param \Games|ObjectCollection $games 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 filterByGames($games, $comparison = null) { if ($games instanceof \Games) { return $this->addUsingAlias(UserReviewsTableMap::COL_GAME_ID, $games->getId(), $comparison); } elseif ($games instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(UserReviewsTableMap::COL_GAME_ID, $games->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByGames() only accepts arguments of type \\Games or Collection'); } }
/** * Exclude object from result * * @param ChildGames $games Object to remove from the list of results * * @return $this|ChildGamesQuery The current query, for fluid interface */ public function prune($games = null) { if ($games) { $this->addUsingAlias(GamesTableMap::COL_ID, $games->getId(), Criteria::NOT_EQUAL); } return $this; }