Single closing parenthesis within HQL causes unexpected result

Description

Following example given:
"SELECT DISTINCT t2.id FROM Table1 t1, Table2 t2 WHERE ....
AND t1.attribute.id = :namedParam)
AND t1.attribute.name LIKE '%xxx' AND..."

In this case I would expect a QuerySyntaxException due to false parenthesis (just one ')') , but instead all conditions after ')' will be ignored and leading to an unexpected result.

Environment

hibernate-core-5.1.8.Final.jar, Java 1.8.0_151, Windows 10.0.15063, PostgreSQL 9.6

Assignee

Unassigned

Reporter

Jan-Oliver deutsch

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Major
Configure