Hi,
I am new to using Hibernate, and in our project, we use Hibernate and Spring to do all the database stuff.
I have a requirement wherein I need to write a method that takes a few inputs and then queries a table to return the sum of a column and the max and min of another column for the given input query criteria.
Now I am confused as to how I can use ORM in this case, should I define a java class for that table and then just use the query without any grouping to fetch the objects of that class and then do a grouping, sum and min,max computations for the resulting object set using Java code, like iterating through the loop?
How best can I use Hibernate to achieve this, I am a newbie to ORM and all the other Objects in my project are all DAOs which operate on a single record.