Пример #1
0
 /**
  * Filter the query by a related \Team\Model\Team object
  *
  * @param \Team\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
  *
  * @return ChildDealerTeamQuery The current query, for fluid interface
  */
 public function filterByTeam($team, $comparison = null)
 {
     if ($team instanceof \Team\Model\Team) {
         return $this->addUsingAlias(DealerTeamTableMap::TEAM_ID, $team->getId(), $comparison);
     } elseif ($team instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(DealerTeamTableMap::TEAM_ID, $team->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByTeam() only accepts arguments of type \\Team\\Model\\Team or Collection');
     }
 }