-->
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.  [ 4 posts ] 
Author Message
 Post subject: Left Outer Join problem in Hibernate 3 migration
PostPosted: Wed Aug 31, 2005 8:05 am 
Newbie

Joined: Wed Aug 31, 2005 7:49 am
Posts: 3
Hi,

I have this HQL Query that was working fine with Hibernate 2

lList=SchoolDAO.getInstance().find("from School school where school.id not in(select school.id from District dist " +
"LEFT OUTER JOIN dist.schools school where school.id is not null)");



Now I migrated to Hibernate 3.0.5. And the above query is generating the following error message.

[JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Incorrect syntax near the keyword 'left'.


Folks ! please help me out of this mess. I am in Hurry.

Thanks for your precious time.

Murali


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 31, 2005 9:30 am 
Regular
Regular

Joined: Thu Dec 02, 2004 7:11 am
Posts: 85
Can you show SQL query generated?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 12:54 am 
Newbie

Joined: Wed Aug 31, 2005 7:49 am
Posts: 3
I am sorry for the delay in responding to you.

Here is the SQL Query being generated.

10:22:25,101 INFO [STDOUT] Hibernate: select school0_.GROUP_ID as GROUP1_, school0_1_.GROUP_DESCRIPTION as GROUP2_35_, school0_1_.GROUP_NAME as GROUP3_35_, school0_1_.GROUP_TYPE_CODE as GROUP4_35_, school0_1_.ADDRESS_1 as ADDRESS5_35_, school0_1_.ADDRESS_2 as ADDRESS6_35_, school0_1_.ADDRESS_3 as ADDRESS7_35_, school0_1_.ADDRESS_4 as ADDRESS8_35_, school0_1_.ZIPCODE as ZIPCODE35_, school0_1_.COUNTRY as COUNTRY35_, school0_1_.PHONE1 as PHONE11_35_, school0_1_.PHONE2 as PHONE12_35_, school0_1_.FAX as FAX35_, school0_1_.EMAIL as EMAIL35_, school0_1_.WEBSITE as WEBSITE35_, school0_1_.CITY as CITY35_, school0_1_.STATE_CODE as STATE17_35_, school0_1_.CONTACT as CONTACT35_, school0_.SCHOOLCODE as SCHOOLCODE39_, school0_.PRINCIPAL as PRINCIPAL39_ from SCHOOL school0_ inner join LS_GROUP school0_1_ on school0_.GROUP_ID=school0_1_.GROUP_ID where school0_.GROUP_ID not in (select school3_.GROUP_ID from DISTRICT district1_ inner join LS_GROUP district1_1_ on district1_.GROUP_ID=district1_1_.GROUP_ID, left outer join DISTRICT_SCHOOLS schools2_ on district1_.GROUP_ID=schools2_.DISTRICT_ID left outer join SCHOOL school3_ on schools2_.SCHOOL_ID=school3_.GROUP_ID left outer join LS_GROUP school3_1_ on school3_.GROUP_ID=school3_1_.GROUP_ID where school3_.GROUP_ID is not null)

Once again sorry for the delay in responding to you. Your help is very much solicited. I do wait for the solution.
Thanks alot.
Murali


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 6:48 am 
Regular
Regular

Joined: Thu Dec 02, 2004 7:11 am
Posts: 85
Exception is rised because of this comma:

district1_1_.GROUP_ID, left outer join DISTRICT_SCHOOLS

Looks like a bug. If you can create a test case with samplified mapping that reproduced this bug and post it to JIRA, this would be helpfull for Hibernate team to reproduce problem and fix it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.