Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.5.1
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Hi.
Here a code to reproduce this issue:
With HQL, use LOWER() in the ORDER BY clause do the work:
{{velocity}} #set($hql = "SELECT prop.value FROM XWikiDocument doc, BaseObject obj, StringProperty prop WHERE doc.fullName = obj.name AND obj.className='XWiki.XWikiUsers' AND prop.id=obj.id AND prop.name='last_name' ORDER BY lower(prop.value)") #set($rs = $services.query.hql($hql).setLimit(10).execute()) $rs {{/velocity}} With XWQL, it does not work: {{velocity}} #set($xwql = "SELECT obj.last_name FROM Document doc, doc.object(XWiki.XWikiUsers) obj ORDER BY lower(obj.last_name)") #set($rs = $services.query.xwql($xwql).setLimit(10).execute()) $rs {{/velocity}}
It returns an exception :
Caused by: org.xwiki.query.jpql.parser.ParserException: [1,83] expecting: id at org.xwiki.query.jpql.parser.Parser.parse(Parser.java:1247)