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?
Please mention your node.js, mongoose and MongoDB version.
Node 9.2
Mongoose 4.13.6
MongoDB v3.6
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 });
@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.
helpfull new Schema(obj, { usePushEach: true });
Most helpful comment
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 theusePushEach
option on your schema.