该文档不存在,它不会出现在查询或快照中吗? Cloud Firestore [英] This document does not exist, it will not appear in queries or snapshots? Cloud Firestore

查看:54
本文介绍了该文档不存在,它不会出现在查询或快照中吗? Cloud Firestore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚接触Cloud Firestore(不是所有人吗?),并且已经使用Node.js中的管理SDK将一些数据添加到了数据库中。它显示在控制台上,但是在文档下显示此文档不存在,它不会出现在查询或快照中。我不确定为什么会这样吗?这是屏幕截图:

I'm quite new to Cloud Firestore (aren't we all?) and I've added some data to my db using the admin SDK in Node.js. It shows up on the console, but under the doc it says "This document does not exist, it will not appear in queries or snapshots." I'm not sure why this is? Here's a screenshot:

推荐答案

要实现的关键是因为您在 root_collection>中创建一个文档root_doc> sub_collection> sub_doc 并不意味着在 root_collection>处实际上有一个文档。 root_doc

The key thing to realize is that just because you create a document at root_collection > root_doc > sub_collection > sub_doc does not mean there is actually a document at root_collection > root_doc.

因此为了向您显示下的文档...>活动> 2017年10月12日>阶段数据,控制台将显示 10-12-2017 好像是一个文档,但它让您知道实际上没有文档在那个位置。因此,如果您查询 ...>下的文档,活动 2017/10/12 将不会显示。

So in order to show you the documents under ... > Events > 10-12-2017 > Phase Data, the console is showing 10-12-2017 as if it was a document, but it's letting you know that there is actually no document at that location. So if you do a query for the documents under ... > Events, 10-12-2017 will not show up.

这篇关于该文档不存在,它不会出现在查询或快照中吗? Cloud Firestore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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