From 12529805870e5089bed0c088a53e6b41f206d359 Mon Sep 17 00:00:00 2001 From: John Pedrie Date: Thu, 9 Aug 2018 11:59:18 -0400 Subject: [PATCH] Update collection documentation for specifying document IDs (#1211) --- Firestore/src/CollectionReference.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firestore/src/CollectionReference.php b/Firestore/src/CollectionReference.php index a7b5aafb26ce..343ea1336e4e 100644 --- a/Firestore/src/CollectionReference.php +++ b/Firestore/src/CollectionReference.php @@ -167,6 +167,9 @@ public function document($documentId) /** * Get a document reference with a randomly generated document ID. * + * If you wish to create a document reference with a specified name, use + * {@see Google\Cloud\Firestore\CollectionReference::document()}. + * * This method does NOT insert the document until you call * {@see Google\Cloud\Firestore\DocumentReference::create()}. * @@ -185,6 +188,12 @@ public function newDocument() /** * Generate a new document reference, and insert it with the given field data. * + * This method will generate a random document name. If you wish to create a + * document with a specified name, create a reference with + * {@see Google\Cloud\Firestore\CollectionReference::document()}, then call + * {@see Google\Cloud\Firestore\DocumentReference::create()} to insert the + * document. + * * This method immediately inserts the document. If you wish for lazy * creation of a Document instance, refer to * {@see Google\Cloud\Firestore\CollectionReference::document()} or