Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2379

BindVariable not registered in JCR-SQL2 CONTAINS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta1
    • 2.0-beta3
    • jackrabbit-spi-commons
    • None

    Description

      The following fails with a "java.lang.IllegalArgumentException: not a valid variable in this query:"

      Query query = qm.createQuery("SELECT * FROM [my:document] AS document WHERE CONTAINS(document.original, $x)", Query.JCR_SQL2);
      query.bindVariable("x", vf.createValue("moo"));

      And query.getBindVariableNames() returns an empty array.

      The FullTextSearchExpression is however correctly parsed as a BindVariableValueImpl:
      ((FullTextSearch) ((QueryObjectModelImpl) query).getConstraint()).getFullTextSearchExpression() instanceof BindVariableValue

      Attachments

        Activity

          People

            Unassigned Unassigned
            buge Philipp Bunge
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: