#remove_attribute doesn't remove attribute from embedded document

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.4.8
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This is related to MONGOID-1293

      When I try to remove attribute in embedded document following query is executed:

      update(

      {"_id"=>BSON::ObjectId('4f71b5d2289ffe2840000001')}

      , {"$set"=>

      {"embedded_doc.my_attribute"=>nil}

      , "$unset"=>{"embedded_doc.my_attribute"=>true}})

      It ends up with attribute still present in document and being nil.

              Assignee:
              Unassigned
              Reporter:
              env0der
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: