-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DATAMONGO-2652 - Implements deleteAllById. #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
Assert.notNull(ids, "The given Iterable of ids must not be null!"); | ||
|
||
return Flux.fromIterable(ids).flatMap(this::deleteById).then(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should collect all ID's into a query to run a single delete query and to avoid issuing a query per given Id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do the same for public Mono<Void> deleteAll(Iterable<? extends T> entities)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the same change for public Mono<Void> deleteAll(Iterable<? extends T> entities)
as well in a separate commit.
Pick and choose.
|
||
Assert.notNull(ids, "The given Iterable of ids must not be null!"); | ||
|
||
ids.forEach(this::deleteById); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a single query here. Going to apply that change during the merge.
….delete(Iterable<ID> ids). See also: DATACMNS-800. Original pull request: #892.
Reorder implementation methods. Reduce visibility of test methods according to JUnit 5 requirements. Original pull request: #892.
Reorder implementation methods. Reduce visibility of test methods according to JUnit 5 requirements. Original pull request: #892.
That's merged and polished now. |
Merge after DATACMNS-800