I have the following @Entities
@Entity public class Configuration{ @OneToMany protected Map<String, Component> components; } and
@Entity public class Component{ protected String displayName; } I do not understand why this works, returning all Configurations
CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Configuration> cq = cb.createQuery(Configuration.class); Root<Configuration> pc = cq.from(Configuration.class); cq.select(pc); But if I do a MapJoin, even without setting any conditions, it does not return anything
CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Configuration> cq = cb.createQuery(Configuration.class); Root<Configuration> pc = cq.from(Configuration.class); MapJoin<Configuration, String, Component> mapJoin = pc.join(Configuration_.components); cq.select(pc); What am I missing? I'm at a loss, I've been through the tutorials, but have not found the answers I need. Any help much appreciated.