SELECT Table1.name,Table1.url,Table1.address,Table1.city,Table1.state,Table1.ErrorMsg as Msg,
sum(Table2.id IS NOT NULL) as QE,Table4.tp as PT FROM Table1
LEFT OUTER JOIN Table2 ON Table2.Table1Id=Table1.id
LEFT OUTER JOIN Table3 ON Table3 .id=Table1.pdId
LEFT OUTER JOIN Table4 ON Table4.venueId=Table3 .id
WHERE Table1.visible = 1 GROUP BY Table1.id ORDER BY Table1.name,Table1.city,Table1.state,QE,PT;
我是 hql 的新手,已经根据对象转换了所有内容,但根据我如何在 hql 中构建左外连接,我一无所知。尝试使用 asException in thread "main" org.hibernate.hql.ast.QuerySyntaxException:
总和聚合函数抛出:
线程“主”org.hibernate.hql.ast.QuerySyntaxException 中的异常:期待 CLOSE,在第 1 行附近发现“IS”,请帮助