简体   繁体   English

HQL 缺少关键字

[英]HQL missing keyword

I've been looking for hours but can't find what is missing in the following query:我一直在寻找几个小时,但找不到以下查询中缺少的内容:

SELECT count(*) FROM Request r JOIN r.status status WHERE r.uniqueId = '123456'

I get the following exception:我收到以下异常:

java.sql.SQLSyntaxErrorException: ORA-00905: missing keyword

I think you missed the keyword AS according to Doc :根据Doc ,我认为您错过了关键字AS

SELECT count(*) 
FROM Request r INNER JOIN 
     r.status AS status -- AS missed
WHERE r.uniqueId = '123456'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM