select count(*) from Attence a join a.employee e where e.eid = :eid and
a.descrip = :descrip
select count(*) from Attence a where a.employee.eid = :eid and a.descrip =
:descrip
以上这个hql语句有什么区别?
------解决思路----------------------
貌似没区别吧,你可以开启show_sql属性看看生成的sql
------解决思路----------------------
没有区别。count能有啥区别呢
------解决思路----------------------
没差别啊
一个连接查询 一个普通查询
------解决思路----------------------
没区别,两种查询方式,结果一样 只是叫法不一样,第一个是连接查询,第二个是普通查询