Пример #1
0
 /**
  * Filter the query by a related \Models\UserGroup object
  *
  * @param \Models\UserGroup|ObjectCollection $userGroup 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 filterByUserGroup($userGroup, $comparison = null)
 {
     if ($userGroup instanceof \Models\UserGroup) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $userGroup->getUserId(), $comparison);
     } elseif ($userGroup instanceof ObjectCollection) {
         return $this->useUserGroupQuery()->filterByPrimaryKeys($userGroup->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUserGroup() only accepts arguments of type \\Models\\UserGroup or Collection');
     }
 }