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

Referenced document frozen on childs after_destroy callback

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

      I need to update the state of a parent document (referenced) when the child is destroyed but cannot as the parent is frozen. As long as the referenced document itself is not destroyed it should not have to be frozen as they are separate documents.

      This bug was introduced sometime after 2.0.2.

      Reproduce with:
      https://gist.github.com/1162014

      Gist also includes error backtrace in comments.

      UPDATE: Actually the error is not triggered at

      Unable to find source-code formatter for language: update_attributes```. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
       but just by referencing 

      parent{{`}}.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbackeus David Backeus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: