Esempio n. 1
0
 /**
  * Declares an association between this object and a ChildMlbTeamRef object.
  *
  * @param  ChildMlbTeamRef $v
  * @return $this|\Players The current object (for fluent API support)
  * @throws PropelException
  */
 public function setMlbTeamRef(ChildMlbTeamRef $v = null)
 {
     if ($v === null) {
         $this->setMlb('');
     } else {
         $this->setMlb($v->getMlb());
     }
     $this->aMlbTeamRef = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildMlbTeamRef object, it will not be re-added.
     if ($v !== null) {
         $v->addPlayers($this);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Exclude object from result
  *
  * @param   ChildMlbTeamRef $mlbTeamRef Object to remove from the list of results
  *
  * @return $this|ChildMlbTeamRefQuery The current query, for fluid interface
  */
 public function prune($mlbTeamRef = null)
 {
     if ($mlbTeamRef) {
         $this->addUsingAlias(MlbTeamRefTableMap::COL_MLB, $mlbTeamRef->getMlb(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Esempio n. 3
0
 /**
  * Filter the query by a related \MlbTeamRef object
  *
  * @param \MlbTeamRef|ObjectCollection $mlbTeamRef 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 filterByMlbTeamRef($mlbTeamRef, $comparison = null)
 {
     if ($mlbTeamRef instanceof \MlbTeamRef) {
         return $this->addUsingAlias(PlayersTableMap::COL_MLB, $mlbTeamRef->getMlb(), $comparison);
     } elseif ($mlbTeamRef instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PlayersTableMap::COL_MLB, $mlbTeamRef->toKeyValue('PrimaryKey', 'Mlb'), $comparison);
     } else {
         throw new PropelException('filterByMlbTeamRef() only accepts arguments of type \\MlbTeamRef or Collection');
     }
 }