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' )
|
|