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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.4-rc-1
    • 6.4.8
    • Query
    • None
    • xwiki -jetty - hsqldb- 8.0-milestone-2
    • Unit
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    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

            mleduc Manuel Leduc
            zoubir Zoubir Medjdoub
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: