문제

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 ONs to WHENs as well as fixing mapping issues but I am not sure how to fix this problem.

도움이 되었습니까?

해결책

I decided to use a native query and my code works well after removing the object mapping references SESSION and appVersion

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top