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: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4.8
    • Fix Version/s: 12.4-rc-1
    • Component/s: Query
    • Labels:
      None
    • Environment:
      xwiki -jetty - hsqldb- 8.0-milestone-2
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • 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:
              mleduc Manuel Leduc
              Reporter:
              zoubir Zoubir Medjdoub
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: