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

fix: infer discriminator key if set in $set with overwriteDiscriminatorKey #15243

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

vkarpov15
Copy link
Collaborator

Re: #15218

Summary

From #15040, we infer discriminator key when casting the update if we have TestModel.updateOne({}, { discriminatorKey }) but not TestModel.updateOne({}, { $set: { discriminatorKey } }). This PR checks the $set case. I ran into this issue while testing potential workarounds for #15218.

Examples

@vkarpov15 vkarpov15 added this to the 8.10.1 milestone Feb 7, 2025
@vkarpov15 vkarpov15 merged commit 1a2faa7 into master Feb 8, 2025
77 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-15218 branch February 8, 2025 22:14
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