英文:
How to query by reference in Firestore (using the Cloud Console)
问题
I was wondering if someone knows if there is a way to query by reference using the Firestore console (with the Panel View or with the new Query Builder).
我在想是否有办法在Firestore控制台中通过引用进行查询(使用面板视图或新的查询构建器)。
I've been trying to do this all day but can't figure it out if its even possible to do it on the UI.
我一整天都在尝试,但无法弄清楚是否可以在用户界面上执行此操作。
What I mean is the following scenario:
我指的是以下情况:
- Having two collections A and B, with B having a
reference
property to an A document.
*有两个集合A和B,其中B具有对A文档的reference
属性。
- Knowing the Document ID from A in advance.
*提前知道A的文档ID。
- Query B to know all documents that has, as a reference, that A document.
*查询B以了解所有具有对A文档的引用的文档。
This is totally possible on code, my problem is doing it on the UI for a quick check every now and then.
这在代码中完全可行,我的问题是如何在用户界面上快速进行检查。
英文:
I was wondering if someone knows if there is a way to query by reference using the Firestore console (with the Panel View or with the new Query Builder).
I've been trying to do this all day but can't figure it out if its even possible to do it on the UI.
What I mean is the following scenario:
- Having two collections A and B, with B having a
reference
property to an A document. - Knowing the Document ID from A in advance.
- Query B to know all documents that has, as a reference, that A document.
This is totally possible on code, my problem is doing it on the UI for a quick check every now and then.
答案1
得分: 1
在Firestore控制台中,目前无法查询文档引用字段。但这是一个有效的请求,所以我建议您向团队提交一个功能请求。
英文:
There currently isn't any way to query for a document reference field in the Firestore console. It's a valid request though, so I recommend filing a feature request with the team.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论