Firestore DB - 以斜体显示的文档 [英] Firestore DB - documents shown in italics

查看:15
本文介绍了Firestore DB - 以斜体显示的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能给我解释一下.我正在使用来自 github 的 Firestore 的 node-firestore-backup-restore-master 备份脚本.让它工作,但它只读取我在集合中的文档列表中的一个文档.它读取的是普通文本,其余的是斜体,斜体的消息说它们不存在并且不会出现在查询中.

Can someone explain this to me. I am working with node-firestore-backup-restore-master backup script for Firestore from github. Got it working but it only reads one document of the list of documents I have in a collection. The one it reads is in normal text the remaining are in italics and a message for the ones in italics says they don't exist and wont appear in queries.

它们确实存在,并且当我从我的 IOS 应用程序而不是从 Node.js 备份脚本查询时会出现相关的文档和字段.

They do exists and the associated documents and fields that appear when I query from my IOS app but not from the Node.js backup script.

有什么想法吗??戴夫

推荐答案

如果您创建带有子文档的文档,然后从 SDK 中删除顶级文档,则删除不会递归.所以当顶级文档消失时,它的子文档仍然存在.

If you create documents with sub-documents and then delete the top level document from an SDK, the delete is not recursive. So while the top-level document is gone, its sub-documents remain.

这些文档 ID 在 UI 中显示为斜体 ID:这些文档实际上并不存在,但我们会显示它们以便您可以导航到子集合.

The document IDs for these are shown as italicized ids in the UI: these documents do not actually exist, but we show them so that you can navigate to the sub collections.

由于没有文档了,文档本身不会出现在查询结果中.如果您需要在查询结果中找到此文档,您需要创建一个空文档作为解决方法.

Since there is no document anymore, the document itself will not show up in query results. If you need to find this document in query results, you'll want to create an empty document as a workaround.

如果您需要通过 API 获取这些不存在的文档,唯一的方法是执行 集合组查询 子集合并从那里确定父文档.

If you need to get these non-existing documents through the API, the only way to do so is by performing a collection group query on the subcollection and determining the parent documents from there.

这篇关于Firestore DB - 以斜体显示的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆