Skip to content

Commit

Permalink
Update collection documentation for specifying document IDs (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpedrie authored and dwsupplee committed Aug 9, 2018
1 parent 7d306c2 commit 1252980
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Firestore/src/CollectionReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()}.
*
Expand All @@ -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
Expand Down

0 comments on commit 1252980

Please sign in to comment.