I have a mySQL stored procedure which does various calculations in my DB and returns the following rowset:
ID integer, DISTANCE float, RADIUS float
These columns are not mapped to any Pojo, and I would like to parse them (like in JDBC)
I currently use HibernateTemplate.findByNamedQuery() to run my stored procedure, however this function returns a List, which is supposed to be List of a mapped Pojo. (in all the example I saw)
But in my case it’s the result set is not related to pojos, how do I return a rowset with this configuration ?
When a query returns scalars, the list returned by Hibernate contains arrays of Objects. So you should have a
List<Object[]>, eachObject[]containing three elements: