Replace deprecated mongodb $pushAll operator with $push + $each
See original GitHub issueAccording to MongoDB documentation $pushAll
has been deprecated since version 2.4. However, it remains the operator Array#push translates into.
On the assumption that is not a breaking change, I think it would be a convenient fix, since some implementation may not rely on $pushAll
. In fact, for what it is worth, Azure’s own MongoDB implementation does not support $pushAll
operator AFAIK .
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
$pushAll — MongoDB Manual
Deprecated since version 2.4: Use the $push operator with $each instead. The $pushAll operator appends the specified values to an array.
Read more >Replace deprecated mongodb $pushAll operator with $push + $each
According to MongoDB documentation $pushAll has been deprecated since version 2.4. However, it remains the operator Array#push translates into.
Read more >why $pushAll deprecated but $pullAll not? - mongodb
mongodb document said that $pushAll is Deprecated since version 2.4: Use the $push operator with $each instead. so I changed all occur of...
Read more >MongoDB/Mongoose Challenge #8 [SOLVED] - JavaScript
According to MongoDB documentation $pushAll has been deprecated since version 2.4. However, it remains the operator Array#push translates into.
Read more >Deprecated List (Spring Data MongoDB 3.3.0-RC1 API)
since 2.2. The eval command has been removed without replacement in MongoDB Server 4.2.0. Deprecated Classes. Class and ...
Read more >
Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This may mitigate the impact of Array.push relying on $pushAll. I tried it myself and seems to work.
instead use
@vkarpov15 Supporting DocumentDB with Mongo Protocol (so not DocumentDB as it is) would be fantastic, even though I can understand that project priorities are on Mongo. Sadly Microsoft seem to have implemented just a fair subset of the latest Mongo API (3.x), so deprecated stuff that comes from 2.x may not work.
In 4.6.4 you’ll be able to use the
usePushEach
option in schemas:new Schema({ arr: [String] }, { usePushEach: true });