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

Callbacks not called on embedded document when not dirty (even with cascaded callbacks enabled)

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Associations, Callbacks
    • None

      I've just encountered a problem whereby no callbacks e.g. before_save are called on an embedded document (with cascade_callbacks: true) if there are no changes to the document. I need the before_save to be fired even if there are no attribute changes as if an upload was successful for example, I would need to write the filename attribute.

      Is there any way to force the callbacks? I would have thought that they should be triggered regardless.

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            thelucid thelucid
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: