hibernate一些坑记录集

1:对比原生sql查询和 hql查询 返回结果的类型

count:

sql: select count(0) from xxx where .... 返回 BigInteger

hql: select count(0) from xxx where .... 返回 Long

max:

sql: select max(0) from xxx where .... 返回 BigDecimal

hsql :select max(0) from xxx where ...返回 deciaml

concat:

sql:select concat('select','xxx') from xxx where ...返回 byte[](很恶心)

hql: 没有这个运算。

 

posted @ 2015-02-06 22:05  沐松  阅读(191)  评论(0编辑  收藏  举报