如何在Firestore中使用Cloud Console按引用查询。

huangapple go评论58阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年4月20日 07:10:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76059452.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定