MongoDB 修改数据Cannot change the size of a document in a capped collection: * != *"
2019-11-01 16:03
1956 查看
MongoDB修改数据库数据的时候报错
原因:
集合被设置成了 固定集合 。固定集合的数据不能被修改。只能查找-删除-再插入,也就是创建集合的时候设置了capped参数为true
解决:
创建集合的时候capped为false或者不写这个参数,默认为false
参考:
相关文章推荐
- .NET中使用GridView控件输入数据时出现“ Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"的问题
- How to Change the Size of a Box-Plot Label in MATLAB
- ADODB使用excel的"Cannot modify the design of table 'xxxx'. It is in a read-only database"的问题
- Error (10309): VHDL Interface Declaration error in keyboard.vhd(63): interface object "scan_code" of mode out cannot be read. Change object mode to bu
- 使用JAVA向MongoDB中插入数据时报错The method insert(DBObject[]) in the type DBCollection is not applicable
- "MONGODB-CR credentials missing in the user document"的解决办法
- 如何调整Dreamhost主机PHP上传尺寸的限制/How to change the maximal size of uploading in your Dreamhost
- tomcat consider increasing the maximum size of the cache java.lang.IncompatibleClassChangeError: Imp
- Get and display the size of file and directory in Linux system using du command 获取和现实linux文件大小(三)
- Spring Boot修改最大上传文件限制:The field file exceeds its maximum permitted size of 1048576 bytes.
- Is there any best way to reduce the size of ibdata in mysql.?
- Whats the best way to split an array in ruby into multiple smaller arrays of random size
- The type OneInterface cannot be a superinterface of OneInterfaceImpl; a superinterface must be an in
- 数据中聚类个数的确定(Determining the number of clusters in a data set)
- 关于error:Cannot assign to 'self' outside of a method in the init family
- AndroidStudio线上APK打包.Error:The number of method references in a .dex file cannot exceed 64K.
- InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
- 关于error:Cannot assign to 'self' outside of a method in the init family
- ExtJS中表格控件的使用,属性设置和数据的获取(copyfrom:http://www.itzhai.com/extjs-form-controls-in-the-use-of-property-)
- Change the value of "Maximum number of concurrent connections" about SQL Server 2012