Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1644

Improve support for immutability for @AfterEventPublication

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core, Integration, Repositories
    • Labels:
      None
    • Sprint:
      Moore SR2, Neumann M3, Neumann M4, Neumann RC1, 2020.0.0 - Ockham M1, 2020.0.0 - Ockham RC2, 2021.0.0 - Pascal M1

      Description

      The support to publish domain events from aggregates leverages @AfterDomainEventPublication to trigger event resets in the aggregate. Implementations usually wipe out a collection which assumes mutability of the aggregate.

      We could change that by inspecting the return type of the method annotated and use the value returned if it is assignable to the aggregate type.

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            olivergierke Oliver Drotbohm
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: