【发布时间】:2021-12-31 07:15:42
【问题描述】:
这是我的 Firestore 数据库的结构示意图
每个公司文档都有一个users 集合
在我的 Flutter 应用程序中,我需要检索一个用户文档(如标有蓝星的那个)。我知道这个文件的id,但不知道它在哪个公司文件下。
检索此类文档的最快方法是什么?我可以使用.collectionGroup(),然后通过doc id 过滤查询吗?
【问题讨论】:
-
或许,这篇文章How to query collections in Firestore under a certain path? 可能会有所帮助。
标签: database firebase flutter google-cloud-firestore