-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix(document): apply virtuals to subdocuments if parent schema has virtuals: true
for backwards compatibility
#14774
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hasezoey
approved these changes
Aug 2, 2024
AbdelrahmanHafez
approved these changes
Aug 5, 2024
This was referenced Sep 4, 2024
This was referenced Sep 19, 2024
Fix #14771
Re: #14394
Re: #14623
Summary
Fixing #14771, which is a bug that was likely introduced by #14623. The issue is that older versions of Mongoose make parent
virtuals
option apply to subdocs presuming that the subdocs don't explicitly setvirtuals
.Examples