I have the following HQL:
Code:
from ServiceProvider sp
where sp.serviceProviderStatus = 1 and
(?1 in (select distinct z.city from Zipcode z left join sp.coverageCounties cnty where z.state = cnty.state and z.county = cnty.county))
This query parses fine but the corresponding generated query fails because the joined table in the subquery is somehow missing:
Code:
from
service_provider servicepro0_
where
servicepro0_.service_provider_status=1
and (
? in (
select
distinct zipcode1_.city
from
zipcodes zipcode1_
where
zipcode1_.state=coverageco2_.state
and zipcode1_.county=coverageco2_.county
)
)
I'm using 3.6.3.Final. I'm at a loss to understand why the joined table, which it appears to have created an alias for "coverageco2_" isn't actually in the from clause.