allow Delete with no parameters to make BasicRepository.deleteAll() valid #413
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This covers the deleteAll() portion of issue #412 that Kyle raised. The issue there is that the method signature of BasicRepository's deleteAll() method isn't a valid way to ask for deletion in Jakarta Data, so it doesn't work properly when the exact same method signature is copied to a user's custom repository that inherits from DataRepository, as Kyle did in his TCK test where he is aiming to add Jakarta Validation annotations to method signatures.
We can make deleteAll() valid under the Jakarta Data spec if we allow the
Deleteannotation to be used on a method without parameters and put it on BasicRepository's deleteAll(). Then when a user copies the method signature to their custom repository, it will behave as expected and perform a delete of all entities as intended.