android - 如何根据firestore中的特定字段检索集合中的文档?
问题描述
我的数据库结构
- `VHpHJDSvjyYmAteoQEu0AeEHWVg2` [collection]
- `LI4deUjJK3uqOGhMLDfR` [document]
- `Gallery` [collection]
- `RjuCvHvuoz2GRW4Rkuyi` [document]
- `attachmentId` [field]
- `type` [field]
获取集合中的所有文档Gallery
Query query = firebaseFirestore.collection(userId).document(docTripId).collection("Gallery");
如何Gallery
根据字段type
等于“相机”检索集合中的文档?
任何帮助将不胜感激。
解决方案
推荐阅读
- html - .gltf 模型比原始 obj 模型更暗
- c - openssl ERR_print_errors_fp() 函数,不能将错误写入文件
- java - 将 Parent 的静态字段值分配给 Child 的非静态字段值的正确方法是什么?
- node.js - 关闭与 Oracle DB 和 Node.js 的 node-oracledb 池连接时出错
- unity3d - Unity3D:找不到字段currentActivity或类型签名
- python - 如何在python中锁定进程并行处理?
- java - 可以在 jenkins docker 容器中安装 oracle jdk 8
- linux - SSH localhost 总是要求输入密码。但密码不是ROOT密码
- java - 每次更改变量时如何生成事件流?
- java - 写入 Elasticsearch 时出错,无法从数据流中插入某些元素