Code:
$queryBuilder->groupBy(\'o.id\') ->having(sprintf(\'SUM(%s.%s IN (:%s)) > 0\', $alias, $field, $valueParameter)) ->