-
Notifications
You must be signed in to change notification settings - Fork 51
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
Investigate support and need of backing up disabled Documents #13
Comments
Added an example of how I created empty docs. Maybe I do something that don't make sence,
Example export const database = firebase.firestore();
// Create an empty document with a collection (is not backup'ed)
database.collection('coll-a/doc-a/coll-b').doc().set({ item1: '1', item2: '2' });
// Creates a non-empty document with a collection (is backup'ed). However, if you delete itemX we get an empty document again.
database.collection('coll-a').doc('doc-b').set({ itemX: 'x' });
database.collection('coll-a/doc-b/coll-b').doc('doc-b').set({ item1: '1', item2: '2' }); |
@ropaolle do you have a real-world use case? I have a few empty collections that I must have preserved but I have yet to run into a case where an empty document arises. |
@jeremylorino not sure I understand your question. The problem I got was that a doc with only one collection as a child was not backed up. My workaround was to move the collection to the root. |
Ok, I misunderstood the original question. Re-read you last comment and I understand now. And regardless of a real world usecase these documents should still be backed up; empty/dangling or not. Gotcha! |
Firestore api supports showing missing docs in a ListRequest |
Brought to attention by @ropaolle in #12
The text was updated successfully, but these errors were encountered: