Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在MongoDB中插入/更新行时,MongoShell中未返回WriteResult_Mongodb - Fatal编程技术网

在MongoDB中插入/更新行时,MongoShell中未返回WriteResult

在MongoDB中插入/更新行时,MongoShell中未返回WriteResult,mongodb,Mongodb,我能够在mongo shell中使用db.collection.insert()语句成功插入文档,但是mongo shell不会返回WriteResult对象 我需要将其设置为配置吗?我看了一些教程,但从来没有提到过任何教程。听起来您的MongoDB shell或服务器的版本低于2.6。MongoDB 2.6中的情况发生了变化。这种情况在我的3.2版本中发生,比如您的MongoDB shell或服务器的版本低于2.6。MongoDB 2.6中的情况发生了变化。这在我的3.2中发生

我能够在mongo shell中使用db.collection.insert()语句成功插入文档,但是mongo shell不会返回WriteResult对象


我需要将其设置为配置吗?我看了一些教程,但从来没有提到过任何教程。

听起来您的MongoDB shell或服务器的版本低于2.6。MongoDB 2.6中的情况发生了变化。这种情况在我的3.2版本中发生,比如您的MongoDB shell或服务器的版本低于2.6。MongoDB 2.6中的情况发生了变化。这在我的3.2中发生