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

MongoDB 3.6 $pushAll is removed by now #5870

Closed
p3x-robot opened this Issue Dec 5, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@p3x-robot

p3x-robot commented Dec 5, 2017

Do you want to request a feature or report a bug?

BUG

What is the current behavior?

It is trying to use $pushAll, which is deprecated since 2.4 and it is not in MongoDB 3.6.

If the current behavior is a bug, please provide the steps to reproduce.

It is trying to use $pushAll.

What is the expected behavior?

image

Please mention your node.js, mongoose and MongoDB version.

Node 9.2
Mongoose 4.13.6
MongoDB v3.6

@vkarpov15

This comment has been minimized.

Show comment
Hide comment
@vkarpov15

vkarpov15 Dec 5, 2017

Collaborator

This is a duplicate of #5670, we've removed $pushAll in the 5.0 branch. As a workaround in 4.x until 5.x is released, set the usePushEach option on your schema.

new Schema(obj, { usePushEach: true });
Collaborator

vkarpov15 commented Dec 5, 2017

This is a duplicate of #5670, we've removed $pushAll in the 5.0 branch. As a workaround in 4.x until 5.x is released, set the usePushEach option on your schema.

new Schema(obj, { usePushEach: true });
@mattmcsparran

This comment has been minimized.

Show comment
Hide comment
@mattmcsparran

mattmcsparran Dec 22, 2017

@vkarpov15 Where exactly in the schema would you place it? Are you talking about in the actual model that would be setup or somewhere else?

EDIT: Nevermind, I figured it out.

mattmcsparran commented Dec 22, 2017

@vkarpov15 Where exactly in the schema would you place it? Are you talking about in the actual model that would be setup or somewhere else?

EDIT: Nevermind, I figured it out.

@lakshmankashyap

This comment has been minimized.

Show comment
Hide comment
@lakshmankashyap

lakshmankashyap Jan 15, 2018

helpfull new Schema(obj, { usePushEach: true });

lakshmankashyap commented Jan 15, 2018

helpfull new Schema(obj, { usePushEach: true });

@Automattic Automattic locked as resolved and limited conversation to collaborators Jan 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.