简体   繁体   English

异常org.hibernate.exception.GenericJDBCException:使用hql缓存数据时无法提取ResultSet

[英]Exception org.hibernate.exception.GenericJDBCException: could not extract ResultSet while feching data using hql

I am trying to get bill details using following query 我正在尝试使用以下查询获取账单详细信息

String hql =  "from BillDetails as bd "
               + "left join fetch bd.billPaidDetails  as bpd"
               + "where bd.client.id=:cid "
               + "and sum(bpd.amount)<bd.total "
               + "order by bd.addDate";

Query query = session.createQuery(hql);
query.setParameter("cid", cid);
obj = query.list();

Here one bill have many billPaidDetails I want to fetch only those bills that are not fully paid for that I am using sum(bpd.amount)<bd.total in where condition but this is showing Exception org.hibernate.exception.GenericJDBCException: could not extract ResultSet How to resolve above exception? 在这里,一个账单有很多billPaidDetails我只想获取那些在条件下使用sum(bpd.amount)<bd.total未完全付清的账单,但显示Exception org.hibernate.exception.GenericJDBCException: could not extract ResultSet如何解决以上异常?

update to List<BillDetails> obj = query.list(); 更新到List<BillDetails> obj = query.list(); .if it can not resolve your problem.I want you show us by the all exception and related entities. .if无法解决您的问题。我希望您向我们展示所有异常和相关实体。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:org.hibernate.exception.GenericJDBCException:无法提取ResultSet - Error: org.hibernate.exception.GenericJDBCException: could not extract ResultSet org.hibernate.exception.GenericJDBCException:无法提取ResultSet - org.hibernate.exception.GenericJDBCException: could not extract ResultSet Hibernate不在新线程{org.hibernate.exception.GenericJDBCException:无法提取ResultSet}中从数据库加载数据 - Hibernate is not loading the data from DB in new thread {org.hibernate.exception.GenericJDBCException: could not extract ResultSet} HHH000327:执行加载命令时出错:org.hibernate.exception.GenericJDBCException:无法提取结果集 - HHH000327: Error performing load command : org.hibernate.exception.GenericJDBCException: could not extract ResultSet org.hibernate.exception.GenericJDBCException:无法插入: - org.hibernate.exception.GenericJDBCException: could not insert: org.hibernate.exception.GenericJDBCException - org.hibernate.exception.GenericJDBCException ested异常是org.hibernate.exception.GenericJDBCException:无法执行查询 - ested exception is org.hibernate.exception.GenericJDBCException: could not execute query org.hibernate.exception.GenericJDBCException:无法在hibernate中执行语句 - org.hibernate.exception.GenericJDBCException: could not execute statement in hibernate org.hibernate.exception.GenericJDBCException:执行此代码时无法执行查询异常 - org.hibernate.exception.GenericJDBCException: could not execute query Exception while executing this code org.hibernate.exception.GenericJDBCException:无法执行查询]的根本原因 - org.hibernate.exception.GenericJDBCException: could not execute query] with root cause
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM