Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top