예제 #1
0
 /**
  * Filter the query by a related \ORM\UserDetail object
  *
  * @param \ORM\UserDetail|ObjectCollection $userDetail  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 filterByDetail($userDetail, $comparison = null)
 {
     if ($userDetail instanceof \ORM\UserDetail) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $userDetail->getId(), $comparison);
     } elseif ($userDetail instanceof ObjectCollection) {
         return $this->useDetailQuery()->filterByPrimaryKeys($userDetail->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByDetail() only accepts arguments of type \\ORM\\UserDetail or Collection');
     }
 }