mysql数据库
Biginteger 转换为Long类型时的错误
hibernate 的createSQLQuery("select count(*) from orders").uniqueResult() 返回的对象是BigInteger类型的
BigInteger totalCount = (BigInteger)this.getSession().createSQLQuery("select count(*) from orders.orders o, customer.customer c,orders.order_logistics ol where o.customerId=c.id and ol.id=o.collectionToolSendLogisticId and o.valid=true").uniqueResult(); totalCount.intValue() totalCount.longValue()
createQuery返回的对象是Long类型的
Long totalCount = (Long)this.getSession().createQuery("select count(*) from Special s where s.valid=true").uniqueResult();
本文出自 “点滴积累” 博客,请务必保留此出处http://tianxingzhe.blog.51cto.com/3390077/1679032
时间: 2024-11-01 01:00:57