Firestore在Android上对Map键的查询

huangapple 未分类评论50阅读模式
英文:

Firestore Query over Map keys Android

问题

所以我有一些产品存储在不同的仓库中。类似这样:所以在仓库"A25"中我将有4个产品,在仓库"A40"中有3个产品。

Product{
  
   placesDeposited:{
                 A25:4,
                 A40:3
   }
}

我尝试了这个:

 Query query = db.collection("products").whereArrayContains("placesDeposited",storageID)

我想将这个查询放在一个RecyclerView中。

我想要一个查询,返回所有存储在Firestore中仓库"A25"中的产品。

英文:

So I have some products stored in different storages. Something like this: So I would have 4 products in storage "A25" and 3 products in storage "A40".

Product{
  
   placesDeposited:{
                 A25:4,
                 A40:3
   }
}

I tried this:

 Query query = db.collection("products").whereArrayContains("placesDeposited",storageID)

I want to put this Query in a recyclerView

I want to have a query that return all products that are stored in storage "A25" in firestore.

huangapple
  • 本文由 发表于 2020年5月5日 01:29:52
  • 转载请务必保留本文链接:https://java.coder-hub.com/61598141.html
匿名

发表评论

匿名网友

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

确定