hibernate
流离岁月
JAVA攻城狮,欢迎留言探讨屠龙术
展开
-
hibernate的双数据源的配置
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001原创 2017-08-04 15:58:19 · 631 阅读 · 1 评论 -
Hibernate select count(*)返回值类型Integer vs Long
COUNT 返回Long对象 MAX MIN 返回类型是跟所使用的字段类型有关 AVG 返回Double SUM 如使用字段是整形,返回Long(以前是返回BigInteger),如果是浮点类型那么就返回Double.由于接触Hibernate较晚, 一直坚定不移的相信select count() 的返回值的类型的是Long. 一次很偶然的机会发现在一段分页函数里发现在使用select cou转载 2017-08-15 09:17:17 · 7387 阅读 · 1 评论