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