Skip to content

Commit 5200038

Browse files
committed
Improve reference documentation on repository methods triggering event publication.
Fixes #2855.
1 parent 2471889 commit 5200038

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
@@ -1267,7 +1267,13 @@ It must not take any arguments.
12671267
You can use it to potentially clean the list of events to be published (among other uses).
12681268
====
12691269

1270-
The methods are called every time one of a Spring Data repository's `save(…)`, `saveAll(…)`, `delete(…)` or `deleteAll(…)` methods are called.
1270+
The methods are called every time one of the following a Spring Data repository methods are called:
1271+
1272+
* `save(…)`, `saveAll(…)`
1273+
* `delete(…)`, `deleteAll(…)`, `deleteAllInBatch(…)`, `deleteInBatch(…)`
1274+
1275+
Note, that these methods take the aggregate root instances as arguments.
1276+
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.
12711277

12721278
[[core.extensions]]
12731279
== Spring Data Extensions

0 commit comments

Comments
 (0)