且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

父文档被标记为“已删除"(斜体)默认

更新时间:2023-12-05 20:31:16

文档和子集合不像文件系统文件和目录那样工作.

创建在文档 ID 下组织的子集合不会隐式创建任何父文档.除了通过您强加的组织之外,子集合不以任何方式与父文档相关联.在不存在的文档 id 下组织子集合是完全有效的.

Creating a subcollection organized under a document ID doesn't implicitly create any parent documents. Subcollections are not tied in any way to a parent document, other than through the organization you impose. It's perfectly valid to organize subcollection under a document id that doesn't exist.

以斜体显示的文档 ID 不一定会被删除".它们以这种方式显示是因为它们不存在,甚至可能从未存在过 - 你无法分辨出它们之间的区别.

Document IDs shown in italics are not necessarily "deleted". They are shown that way because the don't exist, and maybe never existed - you can't tell the difference.

如果您希望任何文档存在,您必须编写一些代码来创建它并为其提供一些字段.如果您从未显式创建文档,则它永远不会存在.

If you want any document to exist, you have to write some code to create it and give it some fields. If you never explicitly create a document, then it never exists.

如果您删除一个文档,它的子集合仍然存在.

If you delete a document, its subcollections still exist.