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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…