New query parser does not allow subselects folowing "from"

Description

The new query parser does not allow subselects folowing "from".

Example:

select us from UserSubject us join (select max(us2.date) as date from UserSubject) us2 ...

Exception from version 3.1rc3:

org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1...
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:242)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:153)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:103)
...

Environment

Hibernate 3.1rc3 and 3.0.5, MySQL 4.1

Activity

Show:
Emmanuel Bernard
December 4, 2005, 12:40 PM

This was never supposed to be supported. Use a SQL query for that

Steve Ebersole
March 21, 2011, 7:06 PM

Bulk closing stale resolved issues

Rejected

Assignee

Unassigned

Reporter

Hugo Lopes

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure