日期:2014-05-19  浏览次数:20706 次

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