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

Add to set doesn't work on non-arrays

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:

      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

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

              Dates

              Created:
              Updated:
              Resolved: