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

Infinite loop when embedded doc has :touch on parent, and parent has :cascade_callbacks on child

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 6.1.1
    • Affects Version/s: 6.1.0
    • Component/s: None
    • None

      class Parent
        include Mongoid::Document
        include Mongoid::Timestamps
        embeds_many :kids, cascade_callbacks: true
      end
      
      class Kid
        include Mongoid::Document
        embedded_in :parent, touch: true
        field :name, type: String
      end
      
      p = Parent.new
      p.kids << (k = Kid.new)
      p.save
      
      k.name = "test"
      k.save
      
      

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            emily.stolfo Emily Stolfo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: