Skip to content

Document event publication from repository delete methods in AbstractAggregateRoot #2903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AbstractAggregateRoot<A extends AbstractAggregateRoot<A>> {
private transient final @Transient List<Object> domainEvents = new ArrayList<>();

/**
* Registers the given event object for publication on a call to a Spring Data repository's save methods.
* Registers the given event object for publication on a call to a Spring Data repository's save or delete methods.
*
* @param event must not be {@literal null}.
* @return the event that has been added.
Expand Down Expand Up @@ -86,7 +86,8 @@ protected final A andEventsFrom(A aggregate) {
}

/**
* Adds the given event to the aggregate for later publication when calling a Spring Data repository's save-method.
* Adds the given event to the aggregate for later publication
* when calling a Spring Data repository's save or delete method.
* Does the same as {@link #registerEvent(Object)} but returns the aggregate instead of the event.
*
* @param event must not be {@literal null}.
Expand Down