Skip to content

Commit 8aff631

Browse files
committed
Improve reference documentation on repository methods triggering event publication.
Fixes #2855.
1 parent f9c1ef9 commit 8aff631

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

1141-
The methods are called every time one of a Spring Data repository's `save(…)`, `saveAll(…)`, `delete(…)` or `deleteAll(…)` methods are called.
1141+
The methods are called every time one of the following a Spring Data repository methods are called:
1142+
1143+
* `save(…)`, `saveAll(…)`
1144+
* `delete(…)`, `deleteAll(…)`, `deleteAllInBatch(…)`, `deleteInBatch(…)`
1145+
1146+
Note, that these methods take the aggregate root instances as arguments.
1147+
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.
11421148

11431149
[[core.extensions]]
11441150
== Spring Data Extensions

0 commit comments

Comments
 (0)