Skip to content
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

docs(document): clarify that toObject() returns a POJO that may contain non-POJO values #15232

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

vkarpov15
Copy link
Collaborator

Fix #15208

Summary

toObject() docs say that toObject() returns a POJO and also say that toObject() does not return a POJO. I think this new explanation clarifies things a little better: toObject() returns a POJO, but may contain non-POJO wrapper objects like ObjectId, etc.

Examples

@vkarpov15 vkarpov15 added this to the 8.9.7 milestone Feb 4, 2025
@hasezoey hasezoey added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Feb 4, 2025
@vkarpov15 vkarpov15 merged commit 52f3ced into master Feb 4, 2025
73 of 74 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-15208 branch February 4, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] discrepency in the doc.toObject function
2 participants