-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Issue with inner join in subquery (Bug?)
PostPosted: Fri Apr 08, 2011 1:13 am 
Newbie

Joined: Fri Apr 08, 2011 1:04 am
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: Issue with inner join in subquery (Bug?)
PostPosted: Wed Apr 20, 2011 10:50 pm 
Newbie

Joined: Fri Apr 08, 2011 1:04 am
Posts: 2
I was just curious if anyone else has encountered this and if this is possibly already an open issue? I'm wondering if I should log this as a new issue.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.