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

Using $set with large integer

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: 1.4.4
    • Component/s: None
    • None
    • ALL

      > 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".

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

              Created:
              Updated:
              Resolved: