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

3.1.x bug: Atomic rename of nil key incorrectly overrides existing key to nil

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Noticed some incorrect behavior of the rename operation

      model.set(:bar, "my value")
      model.unset(:foo)
      
      model.rename(:foo, :bar)
      #=> model.bar == nil          <-- expected that :bar still eqls "my value"
      
      model = model.reload
      #=> model.bar == "my value"
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            johnnyshields Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: