Inconsistence between handling of equality ops and LIKE

Description

These two queries should both be handled, but only the one with the ">" is correctly understood by the HQL Parser, the other fails.

WORKS:

SELECT a.id, a.name, a.articleGroup FROM Article a
WHERE a.articleGroup.hierarchy > (SELECT ag2.hierarchy FROM ArticleGroup ag2 WHERE ag2.id=32)

FAILS:

SELECT a.id, a.name, a.articleGroup FROM Article a
WHERE a.articleGroup.hierarchy LIKE (SELECT ag2.hierarchy FROM ArticleGroup ag2 WHERE ag2.id=32)

About the Entities:

Article has a ManyToOne relation to ArticleGroup, and articleGroup has a hierarchy String attribute, which helps us get some stuff done.

I checked the SVN, and since http://anonsvn.jboss.org/repos/hibernate/core/tags/hibernate-3.5.5-Final/core/src/main/antlr/hql.g is nearly the same as mine in v3.3.1 this should be reproducable in the current final version.

Environment

Hibernate Core 3.3.1, PostgreSQL 8.3

Activity

Show:
Steve Ebersole
October 4, 2013, 2:19 AM

No test case produced

Cannot Reproduce

Assignee

Unassigned

Reporter

DanielD

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major