Exemplo n.º 1
0
 /**
  * Filter the query by a related \Models\Token object
  *
  * @param \Models\Token|ObjectCollection $token the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildClientQuery The current query, for fluid interface
  */
 public function filterByToken($token, $comparison = null)
 {
     if ($token instanceof \Models\Token) {
         return $this->addUsingAlias(ClientTableMap::COL_CLIENT_ID, $token->getClientId(), $comparison);
     } elseif ($token instanceof ObjectCollection) {
         return $this->useTokenQuery()->filterByPrimaryKeys($token->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByToken() only accepts arguments of type \\Models\\Token or Collection');
     }
 }