【发布时间】:2020-10-10 03:27:28
【问题描述】:
我正在查询我的 Firestore 数据库,如下所示:
final Query roasters = Firestore.instance
.collection('retailers')
.where('retail_category', isEqualTo: 'Coffee Roasters');
我收到了零售商集合中所有将“retail_category”设置为“Coffee Roasters”的文档的结果。
问题
我想将retail_category 变成一个单独的集合,而是在retailer 字段中引用它(这将否定以下引用):
“retail_categories/hEN5fzNl2hEc2tEs05Wi”
我尝试了以下方法:
final Query roasters = Firestore.instance
.collection('retailers')
.where('retail_categories', isEqualTo: ' qretail_categories/hEN5fzNl2hEc2tEs05Wi');
这是我的 Firestore 配置:
【问题讨论】:
-
这个问题看起来与您之前询问并删除的问题没有任何不同。 stackoverflow.com/questions/62476583/…
标签: firebase flutter google-cloud-firestore