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

NXQL query by ancestor id

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Tags:
    • Upgrade notes:
      Hide

      New NXQL ecm:ancestorId system property:

      SELECT ... WHERE ... AND ecm:ancestorId = 'some-doc-id'

      This matches all documents under the subtree whose root is 'some-doc-id'.

      Show
      New NXQL ecm:ancestorId system property: SELECT ... WHERE ... AND ecm:ancestorId = 'some-doc-id' This matches all documents under the subtree whose root is 'some-doc-id'.

      Description

      Currently in NXQL to query by ancestor (query of all the elements in a subtree rooted at a given point), you have to know the path of the root of the tree you're interested in, then do:

      SELECT ... WHERE ecm:path STARTSWITH '/foo/bar'
      

      But if what you have is an id and not a path, there is no direct syntax (from the id you have to get the document and then get its path).

      It would be good to have a direct syntax using the id:

      SELECT ... WHERE ecm:ancestorId = 'some-doc-id'
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: