For instance, the current solution uses a secondary select when we already have the join. We just have to provide the proper alias so that Hibernate finds the Map key.