Turning from NPE to a more "user friendly" exception in case of a specific
mistake in a query
---------------------------------------------------------------------------------------------
Key: HHH-2194
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2194
Project: Hibernate3
Type: Improvement
Components: query-hql
Versions: 3.2.0.ga
Reporter: Regis Pires Magalhaes
Priority: Minor
Attachments: QueryCacheTest.java
The following query with an aditional parenthesis (after '%') causes a
NullPointerException in Hibernate. We think the exception could be more specific to be
easily detected by the developer. Obviously we are sendind a very simplified query version
that reproduces the "problem":
select item from Item item
where upper(item.description) like upper(:name) || '%')
and item.id >= :index
We are also attaching a modified hibernate test to ilustrate the NPE.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira