From ae661e996157e98230a0bb9d2508cf4e2afb9057 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 2 Oct 2025 21:37:54 +1300 Subject: [PATCH] Fix missing bulk map --- .../Modules/Databases/Http/Databases/Transactions/Update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php index 9f5e5037bf..214052a173 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php @@ -545,7 +545,7 @@ class Update extends Action $dbForProject->withRequestTimestamp($createdAt, function () use ($dbForProject, $collectionId, $data, &$state) { $dbForProject->createDocuments( $collectionId, - $data, + \array_map(fn($doc) => new Document($doc), $data), onNext: function (Document $document) use (&$state, $collectionId) { $state[$collectionId][$document->getId()] = $document; } @@ -603,7 +603,7 @@ class Update extends Action // Run bulk upsert without timestamp wrapper, checking manually in callback $dbForProject->upsertDocuments( $collectionId, - $data, + \array_map(fn($doc) => new Document($doc), $data), onNext: function (Document $upserted, ?Document $old) use (&$state, $collectionId, $createdAt) { if ($old !== null) { // This is an update - check if document was created/modified in this transaction