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(update): handle casting doubly nested arrays with $pullAll #13285

Merged
merged 2 commits into from Apr 18, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13190

Summary

The problem is that document array elements use the base SchemaType class, so cast() doesn't work after clone(). The current implementation is a bit hacky, so I added a DocumentArrayElement SchemaType so clone()-ed DocumentArrayElements get the correct cast() function.

Examples

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 👍

@vkarpov15 vkarpov15 added this to the 6.10.6 milestone Apr 18, 2023
@vkarpov15 vkarpov15 merged commit fd4da49 into 6.x Apr 18, 2023
34 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-13190 branch April 19, 2023 07:41
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.

None yet

3 participants