mongoose-datatables icon indicating copy to clipboard operation
mongoose-datatables copied to clipboard

DeprecationWarning with Possible Fix Suggestion

Open VonSwirl opened this issue 5 years ago • 1 comments

DeprecationWarning:

collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount

Suggested fix/solution

In mongoose-datatables.js line 82

Change: .all([query.exec(), thisSchema.count(find)])

To: .all([query.exec(), thisSchema.countDocuments(find)])

#16

VonSwirl avatar Jul 18 '18 09:07 VonSwirl