当前位置: 代码迷 >> Web前端 >> hibernate hql 去反复用法
  详细解决方案

hibernate hql 去反复用法

热度:492   发布时间:2012-10-30 16:13:36.0
hibernate hql 去重复用法
  hibernate hql中去重复的方法是用distinct,用法就是加在select之后,
比如
select distinct p.id from person p 


引用
当然也可以new一个对象的时候使用
distinct
select distinct new Person(id,name,sex)


  相关解决方案