【发布时间】:2020-11-02 23:56:03
【问题描述】:
在我的 firebase 的数据库中,我有用户,每个用户都有多个他订购的商店,每个商店都有多个订单。 为了获取特定商店的所有订单,我编写了以下查询,它工作正常。
QuerySnapshot result = await Firestore.instance
.collection('users')
.document(userID)
.collection('Stores').
document(storeID).getDocuments();
但是,我不需要那个。我只需要用户订购的商店。换句话说,我需要特定用户的 storeID 列表。
这是我的代码,但它不起作用。
QuerySnapshot result = await Firestore.instance
.collection('users')
.document(userID)
.collection('Stores').getDocuments();
【问题讨论】:
标签: firebase flutter google-cloud-firestore