Dear All,
I'm rather new to Hibernate and I think it's time to use it in a new brand little application.
I have a little desktop application doing relatively simple queries against a complex database. I mapped tables on classes and obtained a simple domain model (every table mapped with a pojo).
However, I have a slightly more complex query using count, min and max functions, then group by.
Which is the more convenient way to deal with that? Can I create a mapping object containg fields mapped on count(), min() and max() columns in the query? If I can, which is the form of the mapping hibernate file and the POJO class?
Is it better to use a named query (however, I found the HQL query an it seems working but I don't know how to retrieve the single fields of each row, since I don't handle a POJO but a rough row!!!)? If so, how can I retrieve the fields from the named query?
Can you indicate some useful documentation to answer my questions? Thanks in advance.
|