MongoDB嵌套对象字段深度限制 [英] MongoDB nested Object field depth limit
本文介绍了MongoDB嵌套对象字段深度限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我们具有以下JavaScript对象:
var obj = {
field: {
field: {
field: {
field: {...}
}
}
}
}
MongoDB能走多深?
解决方案
符合官方文档 MongoDB支持BSON文档的100级嵌套.除此之外,单个文档的大小限制为16 MB.
如果您有兴趣存储较大的文档,则应阅读有关 GridFS 的信息. /p>
If we have the following JavaScript object:
var obj = {
field: {
field: {
field: {
field: {...}
}
}
}
}
how deep can MongoDB go?
解决方案
In accordance with the official documentation MongoDB supports 100 levels of nesting for BSON documents. Beside this there's a size limitation for a single document which is 16 megabytes.
If you are interested in storing larger documents you should read about GridFS.
这篇关于MongoDB嵌套对象字段深度限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文