Google Firestore - how to get document by multiple ids in one round trip?

前端 未结 11 1815
余生分开走
余生分开走 2020-11-21 22:49

I am wondering if it\'s possible to get multiple documents by list of ids in one round trip (network call) to the Firestore.

11条回答
  •  难免孤独
    2020-11-21 23:34

    This doesn't seem to be possible in Firestore at the moment. I don't understand why Alexander's answer is accepted, the solution he proposes just returns all the documents in the "users" collection.

    Depending on what you need to do, you should look into duplicating the relevant data you need to display and only request a full document when needed.

提交回复
热议问题