Skip to content

Commit

Permalink
updates count documents
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviojava committed May 27, 2019
1 parent 5a75262 commit 05dc830
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public List<DocumentEntity> select(DocumentQuery query) {
public long count(String documentCollection) {
Objects.requireNonNull(documentCollection, "documentCollection is required");
MongoCollection<Document> collection = mongoDatabase.getCollection(documentCollection);
return collection.count();
return collection.countDocuments();
}

private Bson getSort(Sort sort) {
Expand Down

0 comments on commit 05dc830

Please sign in to comment.