示例#1
0
 /**
  * Declares an association between this object and a ChildPositionRef object.
  *
  * @param  ChildPositionRef $v
  * @return $this|\Players The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPositionRef(ChildPositionRef $v = null)
 {
     if ($v === null) {
         $this->setPosition('');
     } else {
         $this->setPosition($v->getPosition());
     }
     $this->aPositionRef = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPositionRef object, it will not be re-added.
     if ($v !== null) {
         $v->addPlayers($this);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildPositionRef $positionRef Object to remove from the list of results
  *
  * @return $this|ChildPositionRefQuery The current query, for fluid interface
  */
 public function prune($positionRef = null)
 {
     if ($positionRef) {
         $this->addUsingAlias(PositionRefTableMap::COL_POSITION, $positionRef->getPosition(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
示例#3
0
 /**
  * Filter the query by a related \PositionRef object
  *
  * @param \PositionRef|ObjectCollection $positionRef 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 ChildPlayersQuery The current query, for fluid interface
  */
 public function filterByPositionRef($positionRef, $comparison = null)
 {
     if ($positionRef instanceof \PositionRef) {
         return $this->addUsingAlias(PlayersTableMap::COL_POSITION, $positionRef->getPosition(), $comparison);
     } elseif ($positionRef instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PlayersTableMap::COL_POSITION, $positionRef->toKeyValue('PrimaryKey', 'Position'), $comparison);
     } else {
         throw new PropelException('filterByPositionRef() only accepts arguments of type \\PositionRef or Collection');
     }
 }