Change streams: return mongoose Document if fullDocument
is present in the change document
#11936
Closed
2 tasks done
Labels
enhancement
This issue is a user-facing general improvement that doesn't fix a bug or add a new feature
new feature
This change adds new functionality, like a new method or class
Milestone
Prerequisites
🚀 Feature Proposal
MongoDB change events may contain the whole document that was modified under the key
fullDocument
. Would it make sense to have mongoose automatically wrap this in an appropriate mongoose Document class?Motivation
Given that I already use mongoose Documents most of the time, it might make sense to have them here. This would enable me to use instance methods, getters, setters, virtual fields, etc.
Example
No response
The text was updated successfully, but these errors were encountered: