![](/img/trans.png)
[英]Error: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
[英]Exception org.hibernate.exception.GenericJDBCException: could not extract ResultSet while feching data using hql
我正在嘗試使用以下查詢獲取賬單詳細信息
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();
在這里,一個賬單有很多billPaidDetails
我只想獲取那些在條件下使用sum(bpd.amount)<bd.total
未完全付清的賬單,但顯示Exception org.hibernate.exception.GenericJDBCException: could not extract ResultSet
如何解決以上異常?
更新到List<BillDetails> obj = query.list();
.if無法解決您的問題。我希望您向我們展示所有異常和相關實體。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.