this question is regarding Firebase (+ Flutter)
is it possible to delete a document and all documents referencing it?
Lets assume i have a structure like this:
-users (collection)
- name
- bookmarks ((sub)collection)
- postId
-post (collection)
- userId
- name
- ...
Now if i delete a post, i want to delete all bookmarks referencing that post. (From all users). Is there an automatic way (coming from RDBMS).
Another question: How can i query all posts and "join" the user infos.
Something like this:
return firestore
.collection("posts")
.orderBy("createdAt")
.snapshots(); // I want to join the userInformation
And are these nested queries then and counting to the api limit?
Thanks in advance