Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Fix #14675

Summary

For other update operators, we correctly handle casting embedded discriminator paths when we can infer the embedded discriminator type from the filter. But looks like not for $pull. This PR fixes that.

We should really clean up the duplicated _getSchema() followed by getEmbeddedDiscriminatorPath() calls. Looks like the only reason why we need to call _getSchema() is because of $fullPath, but we need to investigate some more to figure that out.

Examples

@vkarpov15 vkarpov15 added this to the 8.4.4 milestone Jun 19, 2024
@vkarpov15 vkarpov15 merged commit 3ad5b4f into master Jun 21, 2024
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14675 branch June 21, 2024 20:48
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.

Unable to use $pull on nested array within discriminated union

2 participants