Skip to content

Publish delete events by repository methods deleteInBatch and deleteAllInBatch methods #2448

Closed
@Saturas89

Description

@Saturas89

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.

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"); }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions