Пример #1
0
 /**
  * Filter the query by a related \Platforms object
  *
  * @param \Platforms|ObjectCollection $platforms 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 filterByPlatforms($platforms, $comparison = null)
 {
     if ($platforms instanceof \Platforms) {
         return $this->addUsingAlias(UserReviewsTableMap::COL_PLATFORM_ID, $platforms->getId(), $comparison);
     } elseif ($platforms instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(UserReviewsTableMap::COL_PLATFORM_ID, $platforms->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPlatforms() only accepts arguments of type \\Platforms or Collection');
     }
 }
Пример #2
0
 /**
  * Declares an association between this object and a ChildPlatforms object.
  *
  * @param  ChildPlatforms $v
  * @return $this|\UserReviews The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPlatforms(ChildPlatforms $v = null)
 {
     if ($v === null) {
         $this->setPlatformId(NULL);
     } else {
         $this->setPlatformId($v->getId());
     }
     $this->aPlatforms = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPlatforms object, it will not be re-added.
     if ($v !== null) {
         $v->addUserReviews($this);
     }
     return $this;
 }