コード例 #1
0
 /**
  * Filter the query by a related \ECP\RulesetEntity object
  *
  * @param \ECP\RulesetEntity|ObjectCollection $rulesetEntity 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 filterByRulesetEntity($rulesetEntity, $comparison = null)
 {
     if ($rulesetEntity instanceof \ECP\RulesetEntity) {
         return $this->addUsingAlias(UserTableMap::COL_ID, $rulesetEntity->getUserid(), $comparison);
     } elseif ($rulesetEntity instanceof ObjectCollection) {
         return $this->useRulesetEntityQuery()->filterByPrimaryKeys($rulesetEntity->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByRulesetEntity() only accepts arguments of type \\ECP\\RulesetEntity or Collection');
     }
 }