1

I'm using the below to code to delete the doc, but the delete operation is not done in cloudfirestore databased,still the data exist after delete, Please guide. Collection id:users,

document id: p0lncbJnslgsvtUHW7zcbauk62F3 db image
My cloud firestore version: cloud_firestore: ^0.13.4+2

 await Firestore.instance
    .collection(collectionId)
    .document(documentId)
    .delete();
1
  • 1
    can you attach log along with your question. Commented Oct 31, 2020 at 13:05

1 Answer 1

2

When you see a document ID in italics in the console, that document doesn't actually exist. It's shown because that document ID has subcollections nested under it (which you are not showing in your screenshot. If you want to delete those subcollections, you will need to query for and delete each document in those subcollections. There is no easy way around this in client applications. For server-side code, there are tools to delete a document and subcollections recursively.

See also:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.