【发布时间】:2020-09-14 19:59:22
【问题描述】:
我有这个数据模型。
/tests/testId
{
"photos":{
79075240-f6c3-11ea-9d76-c328c656dbfc:{
"url":"",
"votes":0
},
7a394290-f6c3-11ea-bd51-5d216a9dfad9:{
"url":"urlperPhoto"
"votes":0
}
},
"moderated":false,
"owner":o8SIEjIByyaNciEgCFH5Kfh4ngh2,
"active":false,
"votes":0
}
/tests/testId/votes
{
photoId: 'xxx',
birthday: null,
sex: false,
votedDate: null
}
我想获得一份我没有投过票的帖子列表。因为我已经在其他收藏中投票,所以我可以为帖子模型添加额外的字段。
示例: votedUsers: [user1, user2, user3] 或 votedUsers: {user1: true, user2: true}
但是...我没有像“不存在”这样的 Firebase 过滤器。如果没有他投票的内容,我如何为用户显示帖子?
【问题讨论】:
标签: firebase flutter google-cloud-firestore