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

Dependent restrict relation doesn't prevent Paranoid objects from being marked destroyed

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

      See https://github.com/rehevkor5/mongoid/commit/26492ac1dc35415806f4ec6e2d044bbe202bcede for specs that demonstrate the issue.

      Not only is the object getting marked destroyed, but that modification is also getting saved. That is, of course, surprising because a

      Unable to find source-code formatter for language: mongoid. 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
      ::Errors::DeleteRestriction

      will have been thrown, which you would expect to prevent any

      Unable to find source-code formatter for language: save. 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
      ()

      from executing.

            Assignee:
            durran Durran Jordan
            Reporter:
            rehevkor5 rehevkor5
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: