论坛首页 入门技术论坛

hibernate bug

浏览 1255 次
锁定老帖子 主题:hibernate bug
该帖已经被评为新手帖
作者 正文
   发表时间:2009-05-15  

转载请注明出处(文章末尾虚线内容必须保留)

 

 

 

hibernate中统计报表查询的时候的bug

例如

 

String sql="select count(*),max(age),sum(point) from xxxxxxxx............................";

 查询结果返回

一个object[3]的对象数组,且数组元素的的值全部为第一个聚合函数的值

解决方案:

 

 

String sql="select countName=count(*),maxName=max(age),sumName=sum(point) from xxxxxxxx............................";

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-----------------------------------------------------------------------------------------------------------------------

     转载请注明出处

     本文来自 http://sunflowers.iteye.com

     作者:sunflower

     Email:zhangxuehuaemail@gmail.com  

-----------------------------------------------------------------------------------------------------------------------

论坛首页 入门技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics