Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Fix #14678

Summary

Right now, casting $elemMatch on a primitive array in bulkWrite() throws an error. That's because we have some logic for casting $elemMatch in the primitive array schematype that really belongs in the document array schematype, but in the past we've just thrown all conditional handling logic for arrays onto the primitive array schematype.

With this PR, we now have separate $conditionalHandlers for document array schematype vs primitive array schematype. And the offending logic that caused #14678 is only on the documentarray schematype.

Examples

@vkarpov15 vkarpov15 added this to the 8.4.4 milestone Jun 25, 2024
@vkarpov15 vkarpov15 merged commit 31111f2 into master Jun 25, 2024
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14678 branch June 25, 2024 17:12
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.

BulkWrite updateOne with filter $elemMatch { $elemMatch: { $in: [] } } throwing TypeError

2 participants