fix(cloud_firestore): correct auto-generated ID documentation#18425
fix(cloud_firestore): correct auto-generated ID documentation#18425SONGBUILD wants to merge 1 commit into
Conversation
The documentation for CollectionReference.add() and CollectionReference.doc() incorrectly stated that auto-generated IDs are prefixed with a client-generated timestamp and that the resulting list will be chronologically-sorted. This behavior is specific to Firebase Realtime Database (childByAutoId/push), not Cloud Firestore. Firestore auto-generated IDs are random strings with no timestamp component and no ordering guarantees. Fixes firebase#18422
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Description
The API documentation for
CollectionReference.add()andCollectionReference.doc()incorrectly stated that auto-generated IDs are prefixed with a client-generated timestamp and that the resulting list will be chronologically-sorted. This behavior is specific to Firebase Realtime Database (childByAutoId/push), not Cloud Firestore. Firestore auto-generated IDs are random strings with no timestamp component and no ordering guarantees.Related Issues
Fixes #18422
Checklist
fix).Changes
packages/cloud_firestore/cloud_firestore/lib/src/collection_reference.dart: Updated dartdoc foradd()anddoc()(2 occurrences).packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/platform_interface/platform_interface_collection_reference.dart: Updated dartdoc fordoc()(1 occurrence).The same wording in
firebase_database(Realtime Database) was left unchanged — for RTD, the timestamp-prefix description is correct.