如下面的截图所示,我的Collection 中有2个字段和其他名为‘uId’和‘sellerUId’的字段.两者都是身份验证ID.我要筛选uId==auth_id或sellerUId==auth_id.
我try 了以下查询:
.doc('doc name')
.collection('collection name')
.where(['uId', 'sellerUId'], isEqualTo: 'auth_id')
.get()
.then((QuerySnapshot querySnapshot) {
for (var doc in querySnapshot.docs) {
print(doc.id);
}
});