-->
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: Strange Informix/Hibernate query problem
PostPosted: Fri Aug 28, 2009 12:47 pm 
Beginner
Beginner

Joined: Thu Dec 29, 2005 12:08 pm
Posts: 31
Location: Acton, MA
A colleague of mine is having an issue with a Hibernate-generated query running on Informix. He's running Hibernate 3.2.1 GA.

Here's the generated query as logged by Hibernate:
Code:
2009-08-28 11:44:17,312 DEBUG [org.hibernate.SQL] select first 76 idrec1_.fullname as col_0_0_, idrec1_.city as col_1_0_, profilerec0_.birthDate as col_2_0_, profilerec0_.id as col_3_0_, idrec1_.add_date as col_4_0_ from profile_rec profilerec0_, id_rec idrec1_ where profilerec0_.id=idrec1_.id order by idrec1_.fullname, profilerec0_.id


And here's the error:
Code:
2009-08-28 11:44:17,406 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select idrec1_.fullname as col_0_0_, idrec1_.city as col_1_0_, profilerec0_.birthDate as col_2_0_, profilerec0_.id as col_3_0_, idrec1_.add_date as col_4_0_ from profile_rec profilerec0_, id_rec idrec1_ where profilerec0_.id=idrec1_.id order by idrec1_.fullname, profilerec0_.id]
java.sql.SQLException: Column (profilerec0_) not found in any table in the query (or SLV is undefined).


It would seem that somehow the Hibernate query is causing Informix to think that profilerec0_ is a column, not a table. However, there is nothing wrong that I can see with the SQL.

Any thoughts?

Best,
Laird


Top
 Profile  
 
 Post subject: Re: Strange Informix/Hibernate query problem
PostPosted: Fri Aug 28, 2009 3:20 pm 
Regular
Regular

Joined: Tue Mar 22, 2005 2:27 am
Posts: 62
I just ran your SQL query on Informix 9.40.FC7 without any errors... what version of Informix server and JDBC driver are you running?


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.