From 456edfa7b44b065ed2c73c5cd16b4bfc7adbafdd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 7 Feb 2024 13:37:06 +0100 Subject: [PATCH] Fix mongo findOneAndUpdate --- packages/server/src/integrations/mongodb.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 168b58e589..d50b8f4320 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -518,7 +518,10 @@ class MongoIntegration implements IntegrationBase { return await collection.findOneAndUpdate( findAndUpdateJson.filter, findAndUpdateJson.update, - findAndUpdateJson.options + { + ...findAndUpdateJson.options, + includeResultMetadata: true, + } ) } case "count": {