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

Shell REPL doesn't properly print literal objects containing an _id field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.5.5
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
    • Operating System:
      ALL

      Description

      The following examples illustrate strange behavior with the shell REPL's handling of objects with an _id field. Note that all of these should be valid, and should print the object itself:

      > {_id:1}
      1
      > {'_id':1}
      2014-02-04T11:51:48.382-0500 SyntaxError: Unexpected token :
      > {"_id":1}
      2014-02-04T11:51:54.014-0500 SyntaxError: Unexpected token :
      > var a = {"_id":1}
      > a
      { "_id" : 1 }
      > var a = {_id:1}
      > a
      { "_id" : 1 }

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            benjamin.becker Ben Becker
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: