I used the HibernateTemplate.find(Str
ing query) method to query a table, say PLAYER (corresponding Java object is OBPlayer.java). The query is "from OBPlayer player where player.name='john'". This returns a List, with each element an OBPlayer object.
Now I want to do a group by query, say "select player.age,count(player.ag
e) from OBPlayer player" to get the number of players by age. What does the List return then? How do I get the results I want?
Start Free Trial