Firebase Firestore, get the reference document inside another document

前端 未结 2 1868
旧巷少年郎
旧巷少年郎 2020-12-11 17:47

I\'m using Firebase Cloud Firestore, I want when I\'m getting a document with reference field inside to receive the reference field as a document and not as a r

2条回答
  •  既然无缘
    2020-12-11 18:16

    You can't instruct the Firestore client SDK to automatically follow document references during a fetch of a single document. You have to request each individual document. In other words, there is no "join" operation like you might expect in SQL.

    See also: What is firestore Reference data type good for?

提交回复
热议问题