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

Add ObjectId.toHexString()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.0.4, 2.1.0, 2.2.0
    • JavaScript

    Description

      This method should return the hex string representation of the ObjectId.

      var o = new ObjectId()
      o.valueOf() //yields either ObjectId("4f74646d2a0368211d9a16bc") or "4f74646d2a0368211d9a16bc" depending on the version
      o.toString() //the opposite representation from valueOf()
      o.toHexString() // should get only the string - "4f74646d2a0368211d9a16bc"

      Attachments

        Activity

          People

            tad Tad Marshall
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: