certain forms of HQL generate errors if your package names contain a sql reserved word
--------------------------------------------------------------------------------------
Key: HHH-4482
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4482
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.3.2, 3.2.6
Environment: oracle and hsqldb, tested both 3.3.2GA and 3.2.6GA
Reporter: Karl Palsson
The following queries generates the invalid sql below, if your java package name starts
with a sql reserved word, but work just fine if they don't.
session.createQuery("delete Usergroup where userName = :userName")...
session.createQuery("delete Usergroup u where u.userName = :userName")
The following sql is generated "delete
is.vf.nip.provision.handlers.radius.entities.Usergroup where userName = :userName"
which fails with the message: org.hibernate.hql.ast.QuerySyntaxException: unexpected
token: is near line 1, column 8
If you change the query to "delete from Usergroup where userName = :userName"
you get more normal looking sql like, "delete from usergroup where UserName=?"
All of these forms worked when my packages didn't start with "is" I've
tried to use the ClassicQueryTranslator, but my settings don't seem to take hold for
that.
I can work around this by changing the queries, but my package names should have no
bearing on generated sql :(
This is probably the same as: HHH-3213
--
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