-->
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.  [ 1 post ] 
Author Message
 Post subject: Hsql Bug? Select ...in ((select id from y, select id from z)
PostPosted: Thu May 28, 2009 6:25 am 
Newbie

Joined: Thu May 28, 2009 6:09 am
Posts: 1
Hello,

I think it's a hibernate bug.

My HQL request is:
Code:
select xxx from XXXBean xxx
   where xxx.id in (
   (select yyyid.paEtbIdDemandeurDF from YYYBean yyy where yyy.id.numeroDossierFormation = 'AA-0000000001')
   , (select zzz.id.etablissementIdDispensateur from ZZZBean zzz where zzz.id.numeroDossierFormation = 'AA-0000000001')
      )


The generated SQL request ignore the '(select zzz ...)' part!

Code:
Select ... ... ... from tableXXX xxx0_
where xxx0_.id in (select yyy_.fkxxId from tableYYY yyy1_ where yyy_.g_critere='AA-0000000001')


The select zzz disappear!!!, I should have a query like :

Code:
Select ... ... ... from tableXXX xxx0_
where xxx0_.id in ((select yyy_.fkxxId from tableYYY yyy1_ where yyy_.g_critere='AA-0000000001'),(select zzz_.fkxxId from tableZZZ zzz1_ where zzz_.g_critere='AA-0000000001'))


Any solution before I write this Query in a simple SQL Query?


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

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.