简体   繁体   English

Cloud Firestore中具有相同documentId的两个文档

[英]Two Document having same documentId in Cloud Firestore

I have root collection, inside that two documents having the same Document Id. 我有根集合,在这两个文档中具有相同的文档ID。 The first document having data and the second is in italic format. 第一个具有数据的文档,第二个具有斜体格式。 On click of the second document, it will navigate to an error page saying that the project does not exist or either you do not have permission. 单击第二个文档后,它将导航到错误页面,提示该项目不存在或者您没有权限。 Attaching a screenshot for reference. 附上截图以供参考。 It showing two document with the same DocumentId first in normal case and second in Italic. 它在正常情况下首先显示两个具有相同DocumentId的文档,而在斜体中显示第二个文档。 "Maharashtra", " Maharashtra ". “马哈拉施特拉邦”,“ 马哈拉施特拉邦 ”。 在此处输入图片说明

At some point in the past, you have deleted the document "Maharashtra" without recursively deleting it's child collections. 在过去的某个时候,您已经删除了文档“ Maharashtra”,而没有递归地删除其子集合。

These collections are still present in your database but not currently attached to the parent document. 这些集合仍存在于您的数据库中,但当前未附加到父文档中。 As an example, the document "/states/Maharashtra/logs/day1" might exist with data, while it's parent collection "/states/Maharashtra/logs" is not a part of the current document "/states/Maharashtra" . 例如,文档"/states/Maharashtra/logs/day1"可能与数据一起存在,而其父集合"/states/Maharashtra/logs"却不是当前文档"/states/Maharashtra"

You should be able to expand the italicised entry to see it's orphaned sub-collections. 您应该能够扩展斜体条目以查看其孤立的子集合。

@puf explained it better here . @puf在这里解释得更好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM