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

ClassCastException when specifying the escape character and using like

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Using a request with an explicit "escape" clause and a positional argument, such as:

      where ( doc.fullName like ? escape '!' )
      

      led to a ClassCastException because the argument is not transformed.

      Here's a minimal script for reproducing the bug:

      {{velocity}}
      #set ($query = $services.query.hql("where doc.fullName like :docName escape '!'"))
      #set ($docName = "%Bang!!%")
      #set ($query = $query.bindValue('docName').like($docName).query())
      $query.execute()
      {{/velocity}}
      

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: