JPQL syntax Error

Hi team.

Here i add one JPQL quey…

select o from saas$UserReportingHierarchy o
where o.reportingUser.active = true and o.reportyUser.id = :userId
or o.reportingUser.id in (select o1.reportyUser.id from saas$UserReportingHierarchy o1
where o1.reportyUser.id = :userId)

Here i face the following exception

Exception: com.haulmont.cuba.core.sys.jpql.JpqlSyntaxException: Errors found for input jpql

Likely the solution to your problem is found after this; typically those exceptions point exactly to the JPQL that had a syntax error.

Also, include code in triple backticks for formatting.

Code should end up looking like this.

2 Likes