Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1075

Align .valueOf() for BSON types with legacy shell

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Embedded Shell
    • None
    • Not Needed

      Split out from MONGOSH-1035:

      Legacy shell:

      MongoDB Enterprise atlas-jt9dqp-shard-0:PRIMARY> NumberLong("123").valueOf()
      123
      MongoDB Enterprise atlas-jt9dqp-shard-0:PRIMARY> ObjectId().valueOf()
      61a756896bf35895dbbc6d3b
      

      mongosh:

      Atlas atlas-jt9dqp-shard-0 [primary] test> NumberLong("123").valueOf()
      Long("123")
      Atlas atlas-jt9dqp-shard-0 [primary] test> ObjectId().valueOf()
      ObjectId("61a7568230968deaf2903a12")
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: