HQL parse error of a query with 'left' or 'right' function
Description
The following code raises exception when trying to parse HQL with 'left' (or 'right') function used in the query. It worked on 3.3.3GA with the classic query translator.
A (for now ignored and) dedicated test case has been committed.
Frédéric Delaporte
July 31, 2017 at 10:59 AM
NHibernate.Test.Legacy.SQLFunctionsTest.DialectSQLFunctions demonstrates the issue, but only for Oracle because this test has an "Oracle only" part which tries using left and right functions.
Oskar Berggren
November 12, 2016 at 3:48 PM
As noted workaround is to register the function under a different name. Or use substring(). Not letting this prevent release of 4.1.
Oskar Berggren
November 12, 2016 at 3:30 PM
I wonder if the same problem is present in Hibernate or if they've fixed it. It appears the left/right functions aren't listed in the HQL documentation.
The following code raises exception when trying to parse HQL with 'left' (or 'right') function used in the query. It worked on 3.3.3GA with the classic query translator.
Test code
Mapping
Model
Config