Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13222

XWQL doesn't support LOWER, UPPER, CONCAT or any other function in LIKE expressions

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.4.8
    • Fix Version/s: None
    • Component/s: Query
    • Labels:
      None
    • Environment:
      xwiki -jetty - hsqldb- 8.0-milestone-2
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Steps to reproduce :

      Create new document with this code :

      #set ($authors = $services.query.xwql("SELECT doc.fullName FROM Document doc, doc.object(XWiki.XWikiUsers) obj where obj.first_name like lower('%DMIN%')  ").execute())
      #foreach($author in $authors)
       #set($docAuthor = $xwiki.getDocument("$author"))
        <rs id="" info="$author">$!docAuthor.first_name $!docAuthor.last_name</rs>
      #end
      

      Result :

      Caused by: org.xwiki.query.jpql.parser.ParserException: [1,99] expecting: string literal, input parameter
      	at org.xwiki.query.jpql.parser.Parser.parse(Parser.java:1385)
      	at org.xwiki.query.jpql.internal.JPQLParser.parse(JPQLParser.java:46)
      	at org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:55)
      	at org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zoubir Zoubir Medjdoub
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: