Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete collections with subcollections #92

Open
rezamohamed opened this issue Nov 12, 2021 · 3 comments
Open

Can't delete collections with subcollections #92

rezamohamed opened this issue Nov 12, 2021 · 3 comments

Comments

@rezamohamed
Copy link

Following along the docs, using this

await CrossCloudFirestore.Current
.Instance
.Collection("yourcollection")
.Document("yourdocument")
.DeleteAsync();

I can't seem to delete the collection if there are nested collections below 'yourcollection'. How would I delete an entire Collection (including all sub-collections)?

@vhugogarcia
Copy link

You cannot do it. It is not per the plugin capabilities, but for firebase.

Firebase documentation says that you first need to delete all children collections and documents and then the parents.

@rezamohamed
Copy link
Author

Ah gotcha, ok I iterated through the subcollection and deleted each document individually. Was hoping for a faster solution.

@vhugogarcia
Copy link

Yeah. I wish there is something like that. Hopefully, in the future Firebase provides that support.

Good luck!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants