Example #1
0
 /**
  * @param ChildGamePlatform $gamePlatform The ChildGamePlatform object to add.
  */
 protected function doAddGamePlatform(ChildGamePlatform $gamePlatform)
 {
     $this->collGamePlatforms[] = $gamePlatform;
     $gamePlatform->setGame($this);
 }
Example #2
0
 /**
  * Filter the query by a related \GamePlatform object
  *
  * @param \GamePlatform|ObjectCollection $gamePlatform the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildGameQuery The current query, for fluid interface
  */
 public function filterByGamePlatform($gamePlatform, $comparison = null)
 {
     if ($gamePlatform instanceof \GamePlatform) {
         return $this->addUsingAlias(GameTableMap::COL_ID, $gamePlatform->getGameId(), $comparison);
     } elseif ($gamePlatform instanceof ObjectCollection) {
         return $this->useGamePlatformQuery()->filterByPrimaryKeys($gamePlatform->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByGamePlatform() only accepts arguments of type \\GamePlatform or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildGamePlatform $gamePlatform Object to remove from the list of results
  *
  * @return $this|ChildGamePlatformQuery The current query, for fluid interface
  */
 public function prune($gamePlatform = null)
 {
     if ($gamePlatform) {
         $this->addCond('pruneCond0', $this->getAliasedColName(GamePlatformTableMap::COL_GAME_ID), $gamePlatform->getGameId(), Criteria::NOT_EQUAL);
         $this->addCond('pruneCond1', $this->getAliasedColName(GamePlatformTableMap::COL_PLATFORM_ID), $gamePlatform->getPlatformId(), Criteria::NOT_EQUAL);
         $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
     }
     return $this;
 }