Skip to:
For this JPQL
Hibernate generates this SQL
The table alias for the subquery for all conditions joined by and is wrong, taken not from the subquery but from the main query.
and
Workaround is to use a different alias for the subquery in JPQL.
Test case:
For this JPQL
Hibernate generates this SQL
The table alias for the subquery for all conditions joined by
and
is wrong, taken not from the subquery but from the main query.Workaround is to use a different alias for the subquery in JPQL.
Test case: