Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-994

Support XPath union operator in queries (both SQL and XPath)

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.3
    • Fix Version/s: None
    • Component/s: jackrabbit-core, query
    • Labels:
      None

      Description

      For example, the following query:
      SELECT * FROM nt:base WHERE jcr:path = '/jcr:root/a/b/c/d' OR jcr:path = '/jcr:root/a/e/f'
      will fail with the following exception:
      javax.jcr.query.InvalidQueryException: Invalid combination of jcr:path clauses

      Please see also:
      http://mail-archives.apache.org/mod_mbox/jackrabbit-dev/200604.mbox/%3C44523C57.2030603@gmx.net%3E

      And:
      http://thread.gmane.org/gmane.comp.apache.jackrabbit.devel/6476

      Regards,
      David

        Activity

        Hide
        Edoardo Causarano added a comment -

        Wouldn't this be implementable as follows:

        SELECT * FROM [nt:base] AS blah WHERE " +
        "ISDESCENDANTNODE(blah, '/a/b/c/d') OR " +
        "ISDESCENDANTNODE(blah, '/a/e/f')", Query.JCR_SQL2);

        Best,
        Edoardo

        Show
        Edoardo Causarano added a comment - Wouldn't this be implementable as follows: SELECT * FROM [nt:base] AS blah WHERE " + "ISDESCENDANTNODE(blah, '/a/b/c/d') OR " + "ISDESCENDANTNODE(blah, '/a/e/f')", Query.JCR_SQL2); Best, Edoardo

          People

          • Assignee:
            Unassigned
            Reporter:
            David Garcia
          • Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development