Skip to content

Commit a35227d

Browse files
Merge pull request GoogleCloudPlatform#826 from BenWhitehead/benwhtiehead/b/123429412
docs(samples): Update Datastore snippet for read only transaction
2 parents 2f54a90 + 130a00b commit a35227d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

datastore/api/src/functions/concepts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ function get_or_create(DatastoreClient $datastore, Entity $task)
840840
function get_task_list_entities(DatastoreClient $datastore)
841841
{
842842
// [START datastore_transactional_single_entity_group_read_only]
843-
$transaction = $datastore->transaction();
843+
$transaction = $datastore->readOnlyTransaction();
844844
$taskListKey = $datastore->key('TaskList', 'default');
845845
$query = $datastore->query()
846846
->kind('Task')

0 commit comments

Comments
 (0)