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

Using $set with large integer

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.7.0
    • 1.4.4
    • None
    • None
    • ALL

    Description

      > db.contacts.update(

      {"profile-id" : "test"}

      , {$set: {"actual.0020000000000000000000": "val5"}})
      > db.contacts.find(

      { "profile-id": "test"}

      )
      { "_id" : ObjectId("4c2db755f6ec25d0c44c466a"), "actual" :

      { "key1" : "val1", "key2" : "val2", "001" : "val3", "002" : "val4", "0020000000000000000000" : "val5" }

      , "profile-id" : "test" }

      > db.contacts.update(

      {"profile-id" : "test"}

      , {$set: {"actual.0030000000000000000000": "val6"}})
      > db.contacts.find(

      { "profile-id": "test"}

      )
      { "_id" : ObjectId("4c2db755f6ec25d0c44c466a"), "actual" :

      { "key1" : "val1", "key2" : "val2", "001" : "val3", "002" : "val4", "0030000000000000000000" : "val6" }

      , "profile-id" : "test" }
      --------------

      All working right, except last operation. As you see at last step key
      "0020000000000000000000" was removed, and was replaced by
      "0030000000000000000000".

      Attachments

        Activity

          People

            kristina Kristina Chodorow (Inactive)
            kbanker Kyle Banker
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: