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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.1.7
    • Affects Version/s: 2.4.2
    • Component/s: JavaScript, Shell
    • None
    • Environment:
      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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Whereas NumberInt(NumberInt(1)) does not.

      Workaround using parseInt

      • NumberLong(parseInt(value, 10))

              Assignee:
              Jonathan Reams
              Reporter:
              Declan McGrath
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: