Type inference source is not reset for top level predicates
Description
A query like select 1 from MyEntity e where e in (select e2 from MyEntity e2 join e2.assoc on exists(select 1 ...)) will fail because the type of e is inferred for the numeric 1 literal.
The problem is that the type inference source is not reset properly before visiting top level predicates like the one for the on clause.
A query like
select 1 from MyEntity e where e in (select e2 from MyEntity e2 join e2.assoc on exists(select 1 ...))
will fail because the type ofe
is inferred for the numeric1
literal.The problem is that the type inference source is not reset properly before visiting top level predicates like the one for the
on
clause.