/** * Filter the query by a related sfGuardUserPermission object * * @param sfGuardUserPermission $sfGuardUserPermission the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return sfGuardUserQuery The current query, for fluid interface */ public function filterBysfGuardUserPermission($sfGuardUserPermission, $comparison = null) { if ($sfGuardUserPermission instanceof sfGuardUserPermission) { return $this->addUsingAlias(sfGuardUserPeer::ID, $sfGuardUserPermission->getUserId(), $comparison); } elseif ($sfGuardUserPermission instanceof PropelCollection) { return $this->usesfGuardUserPermissionQuery()->filterByPrimaryKeys($sfGuardUserPermission->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBysfGuardUserPermission() only accepts arguments of type sfGuardUserPermission or PropelCollection'); } }