Can you provide some background, why you want to have a result like this?
Actually if you want Dummy.name + List the most easiest way is to select the Dummy
entities:
// Repo is a SpringData repository interface
Set<Dummy> result = repo.findAll();
final Map<String, List<SubEntity>> collect = result.stream().collect(Collectors.toMap(Dummy::getName, Dummy::getSubs));
In case you want to use criteria queries for filtering by subentity-property, just add this to the findAll, might look like this:
// Not really tested...
Set<Dummy> result = repo.findAll( (root, query, cb) ->
query.where(cb.equal(root.get(Dummy_.SUBS).get(Sub_.SOMEPROP), cb.literal("some-value"));
final Map<String, List<SubEntity>> collect = result.stream().collect(Collectors.toMap(Dummy::getName, Dummy::getSubs));
Alternatively use entity-manager + create query etc. to const