KEY, VALUE and ENTRY should not be strict keywords

Description

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

Environment

3.5.0-Beta2, Db: HSQLDB

Activity

Show:
Strong Liu
May 23, 2011, 7:07 AM

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

Assignee

Steve Ebersole

Reporter

Guenther Demetz

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure