Allow $lookup to join on multiple keys

XMLWordPrintableJSON

    • Query
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The Aggregation Framework $lookup stage currently only allows single key foreign key equality lookups in a joined collection. This does not allow opportunities where the uniqueness of a joined collection requires multiple keys in the joined collection.

      One of the earlier syntaxes for $lookup had the following subdocument, which is consistent with find syntax, and would naturally allow multiple key joins:

      on :

      { sourceKey1 : $foreignKey1 }

      or for multiple keys:

      on :

      { sourceKey1 : $foreignKey1, sourceKey2 : $foreignKey2 }

              Assignee:
              Backlog - Query Team (Inactive)
              Reporter:
              Lee Parayno
              Votes:
              13 Vote for this issue
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: