Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13320

Investigate changes in SERVER-42421: Plug in BSON -> ProjectionAST parser to find command path

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.1
    • manual

    Description

      Description

      Downstream Change Summary

      There were a number of small changes to the projection language made by this ticket:

      1) Projecting on top-level dollar prefixed fields in find() is now banned, with a few exceptions ($sortKey, $recordId, for example) that are for internal use by mongos.
      Example:

      db.c.find({a: 1}, {$foobar: 1}) // Now illegal
      

      2) Performing a projection on a field that also has the $slice expression applied to it is illegal.
      Example:

      db.c.find({}, {“comments”: {$slice: 1}, “comments.id”: 1}) // Illegal
      

      3) $slice may not be used with positional projection on the same field.
      Example:

      db.c.find({"x.a": 1}, {"x.$": {$slice: -1}}) // Illegal
      

      4) It is now illegal to project an empty field name

      Description of Linked Ticket

      null

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              backlog-server-pm Backlog - Core Eng Program Management Team
              Kay Kim Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2 years, 16 weeks, 3 days ago