This document does not exist and will not appear in queries or snapshots, but identically structured document works

前端 未结 5 1614
鱼传尺愫
鱼传尺愫 2021-01-12 00:45

Preface: this question is already asked here but user gave up and gave solution to first answer. This question also differs in that I have two similar collection structures,

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 01:10

    This is telling you that territories/6 does not exist as an actual document, whereas territories/7 does.

    In Cloud Firestore it is possible to have subcollections owned by "virtual" documents - that is the document at the higher level doesn't exist, but it has children.

    These virtual documents can be easy ways to organize information without have to create duplicate dummy documents.

    In this case, you've either:

    1. Created a bunch of dispatch documents under territories/6 before you created the territories document, or
    2. You've subsequently deleted territories/6 without deleting the subcollection documents.

提交回复
热议问题