当前位置: 代码迷 >> J2EE >> HQL中这样写对吗?select distinct stu,tea,cou from Student as stu,Teacher as tea,Course解决办法
  详细解决方案

HQL中这样写对吗?select distinct stu,tea,cou from Student as stu,Teacher as tea,Course解决办法

热度:476   发布时间:2016-04-22 01:21:33.0
HQL中这样写对吗?select distinct stu,tea,cou from Student as stu,Teacher as tea,Course
HQL中这样写对吗?select distinct stu,tea,cou from Student as stu,Teacher as tea,Course as cou where ......

------解决方案--------------------
hql语句貌似不能用distinct ,跟sql还是有区别的
------解决方案--------------------
不能用distinct,我测试过了!之前我也遇到这样的问题!
------解决方案--------------------
放弃HQL 用executeSQLQuery 执行SQL 自己封装VO
  相关解决方案