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

Allow CoreSession.query to return documents from other ids than ecm:uuid

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.3
    • Component/s: Core, Query & PageProvider

      Description

      When calling CoreSession.query, doing a SELECT * FROM Document WHERE ... is doing SELECT ecm:uuid FROM Document WHERE ... and returning the documents whose ids are matching.

      There are additional use cases of returning documents with other ids, notably in the platform.

      1. Direct page provider with SELECT relation:target FROM DefaultRelation WHERE relation:source = ?

      2. Simplifying collection management with a query like SELECT collection:documentIds/* FROM Collection WHERE ecm:uuid = ? instead of having a second collectionMember schema on the member documents and doing SELECT * FROM Document WHERE collectionMember:collectionIds/* = ?

      Note that in both cases this is still not doing a JOIN, we're first computing a list of ids, then fetching (in batch) the list of documents with these ids.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h