I have a portfolio collection in Firestore. Each portfolio has rents and I can remove any of this. Removing the rent just removes that, the rent itself but when I remove a portfolio that contains rents, it leaves the rents inside of an undefined portfolio.
Here you can see a working one but on the left column (...lzw6I...
and others) there are portfolios that were removed and still containing rents:
To remove the portfolio I do something like this:
await FirebaseFirestore.instance
.collection('users')
.doc(authService.getUser().uid)
.collection('portfolios')
.doc(currentPortfolio['documentID'])
.delete();
Can I remove the whole document including those collections?
I use Flutter but this shouldn't be a problem.