/** * Filter the query by a related \CustomerGroup\Model\CustomerGroup object * * @param \CustomerGroup\Model\CustomerGroup|ObjectCollection $customerGroup The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerGroupAclQuery The current query, for fluid interface */ public function filterByCustomerGroup($customerGroup, $comparison = null) { if ($customerGroup instanceof \CustomerGroup\Model\CustomerGroup) { return $this->addUsingAlias(CustomerGroupAclTableMap::CUSTOMER_GROUP_ID, $customerGroup->getId(), $comparison); } elseif ($customerGroup instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(CustomerGroupAclTableMap::CUSTOMER_GROUP_ID, $customerGroup->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCustomerGroup() only accepts arguments of type \\CustomerGroup\\Model\\CustomerGroup or Collection'); } }