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

Do not immediately save embedded associations upon assignment

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Associations
    • None

      This ticket is related to MONGOID-5296 specifically for embedded associations. Refer to MONGOID-5296 for further context.

      Saving on association assignment is doubly-frustrating for embedded documents, because embedded documents should behave like fields. It is always confusing/surprising/unwanted when modifying embedded documents in-Ruby-memory triggers the parent to save.

      This applies (but is not limited) to =, <<, .push, .clear, {}.destroy

            Assignee:
            Unassigned Unassigned
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: