我在toad编辑器上执行查询,我得到了相应的结果。但是,当我在我的eclipse上运行它时,查询正常执行而没有错误,但我的结果列表显示零记录。我应该做哪些更改?
Query query =entityManager.createQuery(" select s.name,c.event_name, count(*) from "
+ " HistoryEntity c ,ServiceEntity s "
+ " where "
+" s.code=c.code"
+ " AND "
+ "c.entry_date BETWEEN :dateDeb AND :dateFin "
+ " AND "
+ " c.state='FINAL'"
+ " AND "
+ " c.idc= :idc"
+ " group by s.name, c.event_name order by s.name, c.event_name"
);
query.setParameter("dateDeb", dateDeb);
query.setParameter("dateFin", dateFin);
query.setParameter("idc", idc);
resultList = query.getResultList();
LOG.info("Query done "+ resultList.size());