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

NumberLong(NumberLong(1)) throws error: Could not convert "NumberLong(1)" to NumberLong

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.1.7
    • 2.4.2
    • JavaScript, Shell
    • None
    • Ubuntu 12.10
    • Fully Compatible
    • ALL
    • Hide

      In the mongodb shell run NumberLong(NumberLong(1))

      Show
      In the mongodb shell run NumberLong(NumberLong(1))
    • Build 7 08/10/15

    Description

      Whereas NumberInt(NumberInt(1)) does not.

      Workaround using parseInt

      • NumberLong(parseInt(value, 10))

      Attachments

        Activity

          People

            jonathan.reams@mongodb.com Jonathan Reams
            theirishpenguin Declan McGrath
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: