While saving a model, I am getting the following mongo error:
MongoError: Unknown modifier: $pushAll.
I am having one array field subDomains in my data structure, refer the following code:
// already Domain instance get availble
Domain.subDomains.push({'name': 'default' , 'role': 'xyz', ...});
// save domain with default fileds
Domain.save()
The system information is as follows:
➜ ~ node --version
v9.4.0
➜ ~ npm --version
5.6.0
➜ ~
➜ ~ mongo --version
MongoDB shell version v3.6.2
git version: ......
OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
➜ ~
Where I am not able to save the model?