You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
I tested just changing line 13 of index from: const count = await constructor.count(query);
to: const count = await constructor.countDocuments(query);
and it fixed the warning message (as per guidelines of mongoose herehttps://mongoosejs.com/docs/deprecations.html
The text was updated successfully, but these errors were encountered:
DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
I tested just changing line 13 of index from:
const count = await constructor.count(query);
to:
const count = await constructor.countDocuments(query);
and it fixed the warning message (as per guidelines of mongoose herehttps://mongoosejs.com/docs/deprecations.html
The text was updated successfully, but these errors were encountered: