Can JPA return results as a map?
We are currently build a map manually based on the two fields a named query returns, because JPA only provides a getResultList(). @NamedQuery{name="myQuery",query="select c.name, c.number from Client c"} HashMap<Long,String> myMap = new HashMap<Long,String>(); for(Client c: em.createNamedQuery("myQuery").getResultList() ){ myMap.put(c.getNumber, c.getName); } But I feel like a custom mapper or similar would be more performant since this list could easily be 30,000+ results. Any ideas to build a Map without iterating manually. (I am using OpenJPA, not hibernate) wrschneider There is no standard