Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2425

Modeshape 4.0+ no longer supports PATH set queries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.Final
    • 4.1.0.Final
    • Query
    • None

      Should a repository contains the following nodes:

      /myvdb1 [vdb:virtualDatabase]
      /myvdb2 [vdb:virtualDatabase]
      /myvdb3 [vdb:virtualDatabase]
      

      In Modeshape 3.8, I can do the following query and find 3 results:

      SELECT * FROM [nt:base] WHERE PATH() IN ('/myvdb1', '/myvbd2', 'myvdb3')
      

      In Modeshape 4.1, this query returns 0 results.

      If I run the following query, I can get back 3 results (1 for each query) as expected:

      SELECT * FROM [nt:base] WHERE PATH() = '/myvdb1'
      SELECT * FROM [nt:base] WHERE PATH() = '/myvdb2'
      SELECT * FROM [nt:base] WHERE PATH() = '/myvdb3'
      

      Therefore, it seems the IN keyword no longer works with the PATH function if the values are simple strings. I note that there are no explicit tests for this in the modeshape codebase.

      Additionally, queries like the following that use PATH/IN with a subquery do return the correct result.

      SELECT * FROM [nt:base] WHERE PATH() IN (
          SELECT * FROM [vdb:virtualDatabase]
      )
      

              hchiorean Horia Chiorean (Inactive)
              parichar@redhat.com Paul Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: