尝试传递日期参数时出现 rhis 错误。有人知道吗?
public List <Object[]>getMontantParVehicule(Date d1,Date d2) {
Session session=HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
System.out.println("Stat HQL");
SQLQuery q=session.createSQLQuery("select IMMAT,SUM(PRIX) as COUT,SUM(QUANTITE) as QUANTITE,COUNT(IMMAT) as nbre from BON_ESSENCE where DATE_BON beetwen :debut and :fin GROUP BY IMMAT ");
// Query q =session.createQuery("select immat,sum(prix) as mnt from BonEssence group by immat ");
q.setParameter("debut",d1 );
q.setParameter("fin",d2 );
return q.list();