Issue
I get the following error for a HQL query.
I can see the path is correct, I fail to understand what is missing here.
Can you please help ?
I get a Hibernate Path expected for join for the below query
@Query(value =
"SELECT DISTINCT rt FROM table1 rt " +
"INNER JOIN rt.pg el " +
"LEFT JOIN rt.ici1 ici "+
"LEFT JOIN rt.tth1 tth "+
"INNER JOIN benefitChunks e ON e.insuranceCoverInfoId = tt " +
"OR e.insuranceCoverInfoFGId = tth " +
"WHERE el.id = ?1 " +
"AND rt.startDate <= ?2 " +
"AND (rt.endDate IS NULL OR rt.endDate >= ?2) " +
"AND UPPER(el.benefitsId) = UPPER(?3)")
List<someValues> abc(long id, LocalDate date, String someString);
Solution
"INNER JOIN benefitChunks e ON e.insuranceCoverInfoId = tt " +
"OR e.insuranceCoverInfoFGId = tth " +
after inner join it expects one of path/field of existing/previous mentioned entity.field not a newly mentioned entity "benefitChunks e"
Answered By - coenni