Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-445

Add to set doesn't work on non-arrays

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 12_01_17
    • Affects Version/s: 1.6.2
    • Component/s: None
    • Labels:

      coll.update(

      {"_id"=>"test"},{"$set"=>{"a"=>"1"}})
      coll.update({"_id"=>"test"}

      ,{"$addToSet"=>{"a"=>"3"}})
      coll.find_one("_id"=>"test") #=>

      {"_id"=>"test", "a"=>"1"}

      #should be:

      {"_id"=>"test", "a"=>["1","3"]}

            Assignee:
            tyler@10gen.com Tyler Brock
            Reporter:
            dem_z Demetrius
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: