Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16678

Add an nxqlEscape automation function

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8.0-HF31, 6.0-HF07, 7.2-SNAPSHOT
    • Fix Version/s: 6.0-HF21, 7.10
    • Component/s: Query & PageProvider
    • Tags:
    • Upgrade notes:
      Hide

      Fn.nxqlEscape can now be used in Automation MVEL expressions.

      Show
      Fn.nxqlEscape can now be used in Automation MVEL expressions.

      Description

      In the platform's Web UI:

      • I create a File manually with the title test"something
      • After creation, I export the document as XML and see that the path contains the quote

      This is troublesome for NXQL queries, for instance in Studio, using the SELECT * FROM Document WHERE ecm:path STARTSWITH '@{Document.path}' query in the Fetch > Query operation
      => if the path is not escaped, this can lead to errors
      => if the path is escaped, the query does not provide any result

      With the new Fn.nxqlEscape, the solution, is to use SELECT * FROM Document WHERE ecm:path STARTSWITH '@{Fn.nxqlEscape(Document.path)}'


      Fn.nxqlEscape can now be used in Automation MVEL expressions. Ex:
      SELECT * FROM Document WHERE ecm:path STARTSWITH '@{Fn.nxqlEscape(Document.path)}'

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: