当出现以下条件时,我希望在任务表上添加一个左联接:左联接获取提示符p on (t.id = p.task.id 和p.applicationName in ('XXX'))select('XXX')) t.id=ser.task.id
and ser.id=app.serverand app.name in ('XX
我有不同的实体类和映射到其他dto,因为我不需要所有的列。(QueryException.java:103) ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile:169) ~[hibernate-core-5.2.17.F
在服务器端代码中,为了获得更好的性能,我们通常不应该使用"select * from table“,而应该根据我在数据库性能指南文章中读到的(Select name,add from employee).This查询必要的列。现在我有了hibernate的问题,我读到在hibernate中使用session.load(id)来检索基于主键的记录更好。这将检索与给定'id‘(表中<