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

JCR-SQL2 query with multiple columns in result only returns last column when using Row.getValues()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.4, 2.4
    • 2.2.12, 2.4.1, 2.5
    • None
    • None

    Description

      When running a query like below on an in-process repository (via TransientRepository) or via RMI access, a call to Row.getValues() only returns the last column selected:

      SELECT property1, property2 FROM [nodetype]

      QueryResult.getColumnNames() returns the right set of columns.

      Stepping through the code shows that org.apache.jackrabbit.core.query.lucene.join.AbstractRow has the implementation of getValues() - this creates a new Values array, then overwrites it multiple times in a for loop that iterates once per column. That doesn't sound like the desired behaviour.

      Getting values via individual calls to Row.getValue("property1") gives the correct results.

      Attachments

        Activity

          People

            reschke Julian Reschke
            dozencrows Nick Tuckett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: