Path arrayness API doesn't track a base collection that is also a secondary collection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If a query like the following is issued:

      coll.aggregate([
              ...
              {
                  $lookup: {
                      from: coll.getName(),
                      as: "z",
                      localField: "y.base",
                      foreignField: "base",
                      pipeline: [{$match: {base: {$gt: 3}}}],
                  },
              },
              {$unwind: "$z"},
              {$project: {_id: 0, "x._id": 0, "y._id": 0, "z._id": 0}},
          ])

      Then we have a base collection that is also a secondary collection. However, querying for the arrayness of a field in "coll" via secondary collections returns a different arrayness value than what the "main" collection knows.

            Assignee:
            Evan Bergeron
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: