Align .valueOf() for BSON types with legacy shell

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: 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
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: