Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19866

Allow more than one array in query when using $ operator

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.5
    • Component/s: Querying
    • Labels:
      None

      The $ operator cannot be used in projections if there is more than one array field in the corresponding query. (http://docs.mongodb.org/manual/reference/operator/projection/positional/#array-field-limitations)

      This seems counter-intuitive since in the projection, the $ operator occurs in an array field name and so it should be unambiguous to which array it refers.

      I'd suggest therefore to remove this limitation and allow the $ operator even if there is more than one array field in the corresponding query.

            Assignee:
            Unassigned Unassigned
            Reporter:
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: