简体   繁体   中英

QuerySyntaxException: Path expected for join

I have a query:

SELECT year_body.year, count(year_body.year) as toOrder 
FROM YearBody year_body 
LEFT JOIN session Session WITH year_body.sessionID = Session.sessionID 
LEFT JOIN version appVersion WITH session.applicationVersion = appVersion.version 
WHERE year_body.eventTime > :period and session.ipAddress NOT LIKE :ip and version.is_release = 1  
GROUP BY (year_body.year) 
ORDER BY toOrder DESC

This query works in MySQL workbench, but when I actually use it in Java I get the error:

QuerySyntaxException: Path expected for join!

I have already got through other errors by switching ON s to WHEN s as well as fixing mapping issues but I am not sure how to fix this problem.

我决定使用本机查询,并且在删除对象映射引用SESSIONappVersion后,我的代码运行良好

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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