Wednesday, 1 March 2017

MongoDB insertOne is not a function [solved]



I try to execute "InsertOne" but it come up a error to say"InsterOne of dbname is not a function"



The reason is my mongodb version is too old . InertOne is new in mongoDB 3.4

db.collection.insertOne()
New in version 3.2.
Inserts a document into a collection.
Solution is to upgrade to Mongodb 3.4




No comments:

Post a Comment

how-to-recursively-create-subfolder-in-each-folder-of-a-directory-in-cmd

test.cmd: @echo off setlocal for /f "usebackq tokens=*" %%a in (`dir /b /a:d`) do ( rem enter the directory pushd %%a echo...