- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想要做的是查找“usuarios
”等于“amigos
”的所有文档。问题是“amigos
”是一个列表。我希望你带上你在该列表中找到的所有字符串( friend )的所有文档。但我收到此错误:
UNIMPLEMENTED: Unsupported FieldFilter value type: 9
CollectionReference collectionReference = db.collection("eventos");
collectionReference.whereEqualTo("usuario", amigos).limit(15).orderBy("hora", Query.Direction.DESCENDING).get().addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
最佳答案
您收到该错误是因为您尝试使用不支持
类型过滤器来过滤数据。您的 amigos
文件是一个 ArrayList
,不能用于过滤数据。 whereEqualTo()
方法的第二个参数永远不能是 ArrayList
。您只能按 supported data types 进行过滤。不幸的是,Firestore 不支持 ArrayList。
另请参阅Query.whereEqualTo(String field, Object value) :
Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be equal to the specified value.
关于java - Firestore 查询 AndroidWhereEqualTo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48780934/
我想要做的是查找“usuarios”等于“amigos”的所有文档。问题是“amigos”是一个列表。我希望你带上你在该列表中找到的所有字符串( friend )的所有文档。但我收到此错误: UNIM
我是一名优秀的程序员,十分优秀!