我的做法是要按三个字段的和排序,用sql可以实现
select *from petInfo order by (pet_strength+pet_cute+pet_love)
其中pet_strength,和pet_cute以及pet_love都是属性,现在我想用hibernate去查找,我改怎么办啊?
...全文
1129打赏收藏
hibernate中的(组合)排序问题,望大虾们帮帮忙啊,谢谢了
我的做法是要按三个字段的和排序,用sql可以实现 select *from petInfo order by (pet_strength+pet_cute+pet_love) 其中pet_strength,和pet_cute以及pet_love都是属性,现在我想用hibernate去查找,我改怎么办啊?