我想知道在使用.where之后是否有办法获得子集合
这是我的数据库格式
Firestore.instance.collection("Users")
.where("followers", arrayContains: id) //id is the users id
//He i want to get the collection of posts that the particular user has posted
子集合在单个文档下,而查询标识一组文档。如果您知道查询仅标识一个文档,则Firestore客户端不知道,即使它已经知道,它也不知道该文档的完整路径。
首先需要执行查询,然后获取单个文档,然后您可以获取每个文档的子集合。