Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1860

#remove_attribute doesn't remove attribute from embedded document

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

      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 Unassigned
            Reporter:
            env0der env0der
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: