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 version 3.6.3 $pushAll Error #778

Open
john-trieu-nguyen opened this issue Mar 13, 2018 · 1 comment
Open

MongoDB version 3.6.3 $pushAll Error #778

john-trieu-nguyen opened this issue Mar 13, 2018 · 1 comment

Comments

@john-trieu-nguyen
Copy link

When joining a password protected private room with MongoDB version 3.6.3, error is thrown:
MongoError: Unknown modifier: $pushAll

$pushAll has been deprecated since 2.4 and it is no longer in MongoDB 3.6.3.

To fix, add { usePushEach: true } to the var RoomSchema in app/models/room.js

Previously:
var RoomSchema = new mongoose.Schema({
...
});

New:
var RoomSchema = new mongoose.Schema({
...
}, { usePushEach: true });

@losingle
Copy link

I had the same problem, and that was the solution.

Automattic/mongoose#5574 (comment)

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

No branches or pull requests

2 participants