Skip to content

Commit 3f13829

Browse files
committed
Improve reference documentation on repository methods triggering event publication.
Fixes #2855.
1 parent dbcf247 commit 3f13829

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/asciidoc/repositories.adoc

+7-1
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,13 @@ It must not take any arguments.
13401340
You can use it to potentially clean the list of events to be published (among other uses).
13411341
====
13421342

1343-
The methods are called every time one of a Spring Data repository's `save(…)`, `saveAll(…)`, `delete(…)` or `deleteAll(…)` methods are called.
1343+
The methods are called every time one of the following a Spring Data repository methods are called:
1344+
1345+
* `save(…)`, `saveAll(…)`
1346+
* `delete(…)`, `deleteAll(…)`, `deleteAllInBatch(…)`, `deleteInBatch(…)`
1347+
1348+
Note, that these methods take the aggregate root instances as arguments.
1349+
This is why `deleteById(…)` is notably absent, as the implementations might choose to issue a query deleting the instance and thus we would never have access to the aggregate instance in the first place.
13441350

13451351
[[core.extensions]]
13461352
== Spring Data Extensions

0 commit comments

Comments
 (0)