Skip to content

docs: adds Model#count to list of fns callback removed from #15349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

SethFalco
Copy link
Contributor

@SethFalco SethFalco commented Apr 10, 2025

Summary

I'm working on migrating from Mongoose v6 to Mongoose v7. Part of this includes dropping all callbacks in favor of Promises.

I noticed that Model#count and Query#count is not in the list though, which according to the types, had a callback param in v6, which was removed in v7. This should be in the list of functions as well that the callback param was removed from too.

(Also fixes a petty typo as well, since I was modifying this file anyway.)

Examples

N/A

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable enough. I guess since count() was removed, we can also say that the callback was removed. Thanks 👍

@vkarpov15 vkarpov15 added this to the 8.13.3 milestone Apr 11, 2025
@vkarpov15 vkarpov15 merged commit bb59d94 into Automattic:master Apr 11, 2025
3 checks passed
@SethFalco
Copy link
Contributor Author

SethFalco commented Apr 11, 2025

The count() function was removed in v8, not v7 which is what this change is for! Only the callback was removed in v7. (I'm still a bit behind on versions, but upgrading 1 major version at a time. ^-^')

@SethFalco SethFalco deleted the patch-1 branch April 11, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants