In HQL, you can use LEFT JOIN only with a related property in the main entity:
Example
EntityA has an entityB of type EntityB so you can
SELECT A FROM EntityA A LEFT JOIN A.entityB B WHERE ...
IF EntityA does not have an entityB property, but EntityB has an entityA property, you cannot write this:
SELECT A FROM EntityA LEFT JOIN EntityB B WHERE B.entityA = A
because you have a mistake. This is a sleep issue that has not yet been resolved.
source share