求助!!!mysql语句转成hql语句
mysql语句:select us.a_user,
sum(us.t),
sum(us.d)
from
(select u.a_user,
CAST(ut.a_traffic AS unsigned int) t,
CAST(ut.a_usetime AS unsigned int) u
from a_usertraffic ut) us
group by us.a_user mysql hql 转换 --------------------编程问答-------------------- 用hql 很麻烦吧。 --------------------编程问答-------------------- 说明下:对象名为UserTraffic
属性名不加a_ --------------------编程问答-------------------- 有解决方案了,给大家分享下
把本次查询结果做为一张视图,在项目里建个类,与这张视图建立关系,再通过本视图进行查询
补充:Java , Java EE