/** * Filter the query by a related sfGuardGroup object * * @param sfGuardGroup|PropelObjectCollection $sfGuardGroup The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return sfGuardUserGroupQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterBysfGuardGroup($sfGuardGroup, $comparison = null) { if ($sfGuardGroup instanceof sfGuardGroup) { return $this->addUsingAlias(sfGuardUserGroupPeer::GROUP_ID, $sfGuardGroup->getId(), $comparison); } elseif ($sfGuardGroup instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(sfGuardUserGroupPeer::GROUP_ID, $sfGuardGroup->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterBysfGuardGroup() only accepts arguments of type sfGuardGroup or PropelCollection'); } }