【发布时间】:2020-02-19 08:25:44
【问题描述】:
我正在尝试在 firestore 中对 2 个概念进行建模并关联
collection: users
key/document_id: email
document: profile info
collection: topics
key/document_id: random
document: metadata with a field indicating email of user (to use for lookups)
我的目标是
- 用户中的“参考”主题以便于查找,但不知道该怎么做 它不是一个子集合。
- 基于将作为身份验证的一部分传递的电子邮件,我希望有安全规则以允许仅在路径、字段上写入集合 基于电子邮件
以上两种方法在 Firebase 中都是可行的。感谢任何指针!
【问题讨论】:
-
我们通常根据要执行的查询来构建 Firestore 数据库。这些查询是什么?
-
查询用户资料,根据兴趣查询Feed等话题
标签: firebase google-cloud-firestore firebase-authentication firebase-security