I wonder if there's any mechanism to use count
in Spring Data MongoDB repository with @Query
annotation?
I would love to receive the number of documents that I have without having to get all of them.
Basically, the equivalent of this in Java:
db.test.find({"type":"foo"}).count
See Question&Answers more detail:os