阅读背景:

Sql count在Hibernate中返回一个奇怪的值

来源:互联网 

I created a query which suppose to return a number of counted rows. I tested my query using mysql query browser and it worked absolutely fine(it returns the correct result). However, when I used the same query in hibernate with addScalar method, it returned a rediciously large random number. For example, first time it may return 5390, the second time may return 9380 and the third time may be a different one for the expecting result which 1.I created a query which suppose to return a num




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: