Skip to content

Commit 130a00b

Browse files
committed
docs(samples): Update Datastore snippet for read only transaction
* `datastore_transactional_single_entity_group_read_only`
1 parent cbd9e74 commit 130a00b

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)