You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repository methods(deleteById/deleteInBatch/deleteAllInBatch) do not trigger domain events.
In the class EventPublishingMethod in File EventPublishingRepositoryProxyPostProcessor.java
there is a method to check, if the method is a delete method.
mp911de
changed the title
Domain event is not triggered by repository methods "deleteById/deleteInBatch/deleteAllInBatch"
Publish delete events by repository methods deleteInBatch and deleteAllInBatch methods
Sep 14, 2021
The repository methods(
deleteById/deleteInBatch/deleteAllInBatch
) do not trigger domain events.In the class
EventPublishingMethod
in FileEventPublishingRepositoryProxyPostProcessor.java
there is a method to check, if the method is a delete method.
private static boolean isDeleteMethod(String methodName) { return methodName.equals("delete") || methodName.equals("deleteAll"); }
I would suggest similiar to the
isSaveMethod
:private static boolean isDeleteMethod(String methodName) { return methodName.startsWith("delete"); }
The text was updated successfully, but these errors were encountered: