Hello,
I have a simple HQL query :
Code:
SELECT _food.name, _orderelement.quantity, COUNT(_orderelement.quantity) FROM Order _order inner join _order.orderElements as _orderelement inner join _orderelement.food as _food GROUP BY _food.name,_orderelement.quantity ORDER BY _food.name ASC
This query returns what i want but when I try to get these datas via
getHibernateTemplate.fin(myQuery) it returns java.util.List<java.lang.Object>
Suppose I have a bean with the required properties called summary
Code:
return (List<Summary>)getHibernateTemplate().find("SELECT _food.name, _orderelement.quantity, COUNT(_orderelement.quantity) FROM Order _order inner join _order.orderElements as _orderelement inner join _orderelement.food as _food GROUP BY _food.name,_orderelement.quantity ORDER BY _food.name ASC");
I never have a real List<Summary> but always a List<Object>
Does anyone has a solution ?