Skip to content

Conversation

@njr-11
Copy link
Member

@njr-11 njr-11 commented Jan 4, 2024

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 Delete annotation 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.

…sitory.deleteAll() valid

Signed-off-by: Nathan Rauh <[email protected]>
@njr-11 njr-11 force-pushed the 412-make-BasicRepository-deleteAll-valid branch from b2f8f47 to cbd3151 Compare January 5, 2024 17:25
@njr-11
Copy link
Member Author

njr-11 commented Jan 5, 2024

Rebased onto latest. This is still needed because it includes the doc update to allow Delete on a method with zero parameters.

@otaviojava otaviojava merged commit d28218b into jakartaee:main Jan 5, 2024
@KyleAure KyleAure mentioned this pull request Jan 8, 2024
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants