-->
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: Hibernate query gets bonehead error from MySQL
PostPosted: Sat Aug 02, 2008 1:58 am 
Regular
Regular

Joined: Thu Apr 15, 2004 1:12 pm
Posts: 55
Hibernate version: 3.0

Name and version of the database you are using: MySQL 4.0.20

The generated SQL (show_sql=true):

Actually this is the full query, via p6spy:

select this_.id as id0_, this_.name as name0_0_, this_.description as descript3_0_0_, this_.startdate as startdate0_0_, this_.enddate as enddate0_0_, this_.starttime as starttime0_0_, this_.endtime as endtime0_0_, this_.phone as phone0_0_, this_.link as link0_0_, this_.location as location0_0_, this_.address as address0_0_, this_.city as city0_0_, this_.locationlink as locatio13_0_0_ from event this_ where (this_.startdate>='2008-08-01 00:00:00.0' or this_.enddate>='2008-08-01 00:00:00.0') order by this_.startdate asc;

This query takes an error from the database:

java.sql.SQLException: null, message from server: "Unknown column 'this_.description' in 'field list'"

However, when I fire up mysql and issue this same query by hand, I get the expected result (not an error!)

How can this be? Any ideas?

Incidentally... This same application is working fine on my laptop (a MacBook Pro running MySQL 5.0.45), and I just pushed it up to this server running MySQL 4.0.20. However, I have a slightly different instance of this application also running on this server, so I don't think it's a msyql version issue...

thanks,
ml


Top
 Profile  
 
 Post subject: Re: Hibernate query gets bonehead error from MySQL
PostPosted: Sat Aug 02, 2008 2:20 pm 
Regular
Regular

Joined: Thu Apr 15, 2004 1:12 pm
Posts: 55
DISREGARD... it was a hibernate misconfiguration. Sorry for the noise. I should've just gone to bed and looked again when I was fresh :-)


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.