看看这个 hql 错在哪儿?
小灰狼 2020-11-19 05:36:55 SELECT
o
FROM
(
SELECT
max( c.inspectVerifyLogId ) AS logId,
c.shopId
FROM
org.wolfgroup.inspect.rubbish.entity.InspectVerifyLog c
WHERE
c.shopId IN : shopIds
AND c.inspectVerifyId IS NULL
GROUP BY
c.shopId
) t1
LEFT JOIN org.wolfgroup.inspect.rubbish.entity.InspectVerifyLog o ON t1.logId = o.inspectVerifyLogId
错误提示是
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: ( near line 1, column 17 [ select o from (select max(c.inspectVerifyLogId) as logId, c.shopId from org.wolfgroup.inspect.rubbish.entity.InspectVerifyLog c where c.shopId in :shopIds and c.inspectVerifyId is null group by c.shopId) t1 left join org.wolfgroup.inspect.rubbish.entity.InspectVerifyLog o on t1.logId = o.inspectVerifyLogId]