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

Add to set doesn't work on non-arrays

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • 1.6.2
    • 12_01_17
    • None

    Description

      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"]}

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: