[英]cannot filter data when using `where` query on firebase_admin
The problem comes from the fact that your age
field is of type String (it's shown between double quotes in the console), while your query is using a Number (the third parameter passed to the where()
method).问题在于您的age
字段是字符串类型(在控制台中显示在双引号之间),而您的查询使用的是数字(传递给where()
方法的第三个参数)。
You don't show how you create the doc but it's there that you have to take care of writing this field with the desired type, ie Number in your case.你没有展示你是如何创建文档的,但在那里你必须注意用所需的类型编写这个字段,即你的情况下的数字。
PS: there are probably two typos in your code with the where()
method: there are two extra u
. PS:使用where()
方法的代码中可能有两个拼写错误:有两个额外的u
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.