コード例 #1
0
 /**
  * Filter the query by a related \ECP\RulesetEntity object
  *
  * @param \ECP\RulesetEntity|ObjectCollection $rulesetEntity The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildRulesetShipQuery The current query, for fluid interface
  */
 public function filterByRulesetEntity($rulesetEntity, $comparison = null)
 {
     if ($rulesetEntity instanceof \ECP\RulesetEntity) {
         return $this->addUsingAlias(RulesetShipTableMap::COL_RULESETENTITYID, $rulesetEntity->getId(), $comparison);
     } elseif ($rulesetEntity instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(RulesetShipTableMap::COL_RULESETENTITYID, $rulesetEntity->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByRulesetEntity() only accepts arguments of type \\ECP\\RulesetEntity or Collection');
     }
 }