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

MongoDB 3.6 $pushAll is removed by now #5870

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

MongoDB 3.6 $pushAll is removed by now #5870

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

Comments

@p3x-robot
Copy link
Contributor

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
Copy link
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
Copy link

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
Copy link

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants