I\'m using Spring Data with MongoDB using MongoRepository.
I was wondering if it is possible do a delete by filter using query annotation. I have been looking here and g
Unfortunately spring data doesn't provides any method to delete documents based on a query. And the @Query annotation is only for find documents.
@Query
What you could do is implement a custom repository that deletes documents based on what you want.