vladlosev/mongodb-fs — pull request #13 by vladlosev (2014-12-02 05:53:47+00:00)
Title: Bugfixes in $pushAll

@corydobson @parkr
This fixes two bugs in `$pushAll` operator for `update`:

1. Invalid handling on non-existent target fields. For example, running `db.collection.update({}, {$pushAll: {a: [1]}})` on a document `{b: 2}` would produce `{a: [], b: 2}` instead of `{a:[1], b: 2}`.
2. Not failing on non-array arguments properly. E.g., running `db.collection.update({}, {$pushAll: {a: 1}})` would cause unhandled exception instead of returning the same error message as MongoDB.