Search code examples
firebasegoogle-cloud-firestorefirebase-console

Google Firestore find deleted subcollections for a deleted document


When I go to delete a document from the Firestore console, I get the following message: "This will permanently delete all data at this location, including all nested data."

However, the Firestore documentation reads: "Deleting a document does not delete the documents in its subcollections"

Can someone clarify this relationship for me?

If I delete a document from the Firestore console, it appears to remove all subcollections and nested data. If it doesn't, how can I delete said sub collections since I can no longer see them?


Solution

  • The console will do exactly what it says - delete the document and all of the subcollections organized under it.

    The client APIs will not. If you delete a document using the standard delete() method on a document reference, it will not delete anything organized under it.