right function in HQL update gives parser exception
---------------------------------------------------
Key: HHH-7091
URL:
https://hibernate.onjira.com/browse/HHH-7091
Project: Hibernate ORM
Issue Type: Bug
Affects Versions: 3.6.7
Environment: H2Dialect
Reporter: Willis Blackburn
Priority: Minor
Tried to execute an HQL statement that looked like this:
update Item i set i.path = right(i.path, length(i.path))
The update is a no-op. Hibernate can't parse it:
unexpected token: right near line 1, column 32 [update v3g.Item i set i.path =
right(i.path, length(i.path))]
However the equivalent with substring works just fine:
update Item i set i.path = substring(i.path, 1, length(i.path))
Maybe Hibernate is getting confused because "right" is both a function (defined
in H2Dialect) and a keyword (as in "right join").
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira