[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4613?page=c...
]
Strong Liu commented on HHH-4613:
---------------------------------
Steve,
i don't think it is expected of this issue, but
org.hibernate.test.hql.VariousKeywordPropertyEntity causes
org.hibernate.test.hql.ASTParserLoadingTest fail on all DBs except h2/hsqldb due to the
keywords, db can't create table for it
KEY, VALUE and ENTRY should not be strict keywords
--------------------------------------------------
Key: HHH-4613
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4613
Project: Hibernate Core
Issue Type: Bug
Components: query-hql
Affects Versions: 3.5.0.Beta-1
Environment: 3.5.0-Beta2, Db: HSQLDB
Reporter: Guenther Demetz
Assignee: Steve Ebersole
Priority: Minor
Fix For: 3.5.0-CR-2
Attachments: TestCaseQueryWithCondition.jar
Time Spent: 0.9h
Remaining Estimate: 0h
org.hibernate.hql.ast.QuerySyntaxException: expecting OPEN, found '=' near line
1, column 27
is thrown calling
((org.hibernate.Session) session).createQuery("from hello.A where value = ?");
Please note that until Hibernate3.3.2GA this worked fine!
Apparently 'value' unintentionally has become a reserved keyword for HQL
conditions.
Here the complete stacktrace:
--> org.hibernate.hql.ast.QuerySyntaxException: expecting OPEN, found '='
near line 1, column 27 [from hello.A where value = ?]
at
org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at
org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:284)
at
org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182)
at
org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at
org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at
org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at
org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1586)
at hello.TestQueryWithCondition.testQuery(TestQueryWithCondition.java:40)
Please consider attached junit-testcase.
best regards
Guenther Demetz
--
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