-->
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.  [ 3 posts ] 
Author Message
 Post subject: Could do with a proper error in translation of bad HQL
PostPosted: Tue Dec 21, 2004 5:54 pm 
Newbie

Joined: Mon Sep 27, 2004 2:15 am
Posts: 11
Location: Helsinki, Finland
When giving a bad classname in an HQL statement, as below, it would be nice to get a proper error message from Hibernate, instead of it just generating bad SQL and poor old me getting errors from MySQL -- this actually had me thinking there might be a defect in Hibernate :) (banish the thought).

Hibernate version: 2.1.7c

Snippet of the code: session.find("from NonexistentClass where name='foo'");

Name and version of the database you are using: MySQL 4.0.17 (switching dialects didn't appear to affect behaviour this though)

The generated SQL (show_sql=true): select from where (name='foo' )

Debug level Hibernate log excerpt:
1682 [main] DEBUG net.sf.hibernate.hql.QueryTranslator - HQL: from NonexistentClass where name='foo'
1682 [main] DEBUG net.sf.hibernate.hql.QueryTranslator - SQL: select from where (name='foo' )


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 4:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i've been bitten by this one too....add it to the JIRA so we won't forget...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2004 4:58 am 
Newbie

Joined: Mon Sep 27, 2004 2:15 am
Posts: 11
Location: Helsinki, Finland
Done. HB-1364


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