-
Notifications
You must be signed in to change notification settings - Fork 87
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
collection.document() to assign a random ID to the document reference #14
Comments
https://firebase.google.com/docs/firestore/manage-data/add-data |
You're right, a semi-random id is created in one of two cases:
To fix this issue, we should make it so that @override
DocumentReference document([String path]) {
if (path == null) {
path = // make some id
}
return MockDocumentReference(path, getSubpath(root, path), root,
getSubpath(snapshotStreamControllerRoot, path));
} Do you have such a use case in your projects? I have never run into it because I always use |
In real Firestore,
Without specifying documentId, |
It would be great upon
documentRefeference.setData
, the document reference has a random String ID within the collection.My expectation in the following test:
The text was updated successfully, but these errors were encountered: