Exemple #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildTeam $team Object to remove from the list of results
  *
  * @return $this|ChildTeamQuery The current query, for fluid interface
  */
 public function prune($team = null)
 {
     if ($team) {
         $this->addUsingAlias(TeamTableMap::COL_ID, $team->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Exemple #2
0
 /**
  * Declares an association between this object and a ChildTeam object.
  *
  * @param  ChildTeam $v
  * @return $this|\Haus23\Dtp\Model\Match The current object (for fluent API support)
  * @throws PropelException
  */
 public function setAwayteam(ChildTeam $v = null)
 {
     if ($v === null) {
         $this->setAwayteamId(NULL);
     } else {
         $this->setAwayteamId($v->getId());
     }
     $this->aAwayteam = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildTeam object, it will not be re-added.
     if ($v !== null) {
         $v->addMatchRelatedByAwayteamId($this);
     }
     return $this;
 }
Exemple #3
0
 /**
  * Filter the query by a related \Haus23\Dtp\Model\Team object
  *
  * @param \Haus23\Dtp\Model\Team|ObjectCollection $team 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 ChildMatchQuery The current query, for fluid interface
  */
 public function filterByAwayteam($team, $comparison = null)
 {
     if ($team instanceof \Haus23\Dtp\Model\Team) {
         return $this->addUsingAlias(MatchTableMap::COL_AWAYTEAM_ID, $team->getId(), $comparison);
     } elseif ($team instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(MatchTableMap::COL_AWAYTEAM_ID, $team->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAwayteam() only accepts arguments of type \\Haus23\\Dtp\\Model\\Team or Collection');
     }
 }