From 0a2b8624e867e825e3866fa93956f5cd7455f714 Mon Sep 17 00:00:00 2001 From: Mark Carrington <31017244+MarkMpn@users.noreply.github.com> Date: Sun, 12 May 2024 08:59:19 +0100 Subject: [PATCH] Do not attempt to use DeleteMultiple except on elastic tables Fixes #469 --- MarkMpn.Sql4Cds.Engine/ExecutionPlan/DeleteNode.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/DeleteNode.cs b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/DeleteNode.cs index ecbc11eb..a4975ed8 100644 --- a/MarkMpn.Sql4Cds.Engine/ExecutionPlan/DeleteNode.cs +++ b/MarkMpn.Sql4Cds.Engine/ExecutionPlan/DeleteNode.cs @@ -263,7 +263,9 @@ protected override ExecuteMultipleResponse ExecuteMultiple(DataSource dataSource if (!req.Requests.All(r => r is DeleteRequest)) return base.ExecuteMultiple(dataSource, org, meta, req); - if (meta.DataProviderId == DataProviders.ElasticDataProvider || dataSource.MessageCache.IsMessageAvailable(meta.LogicalName, "DeleteMultiple")) + if (meta.DataProviderId == DataProviders.ElasticDataProvider + // DeleteMultiple is only supported on elastic tables, even if other tables do define the message + /* || dataSource.MessageCache.IsMessageAvailable(meta.LogicalName, "DeleteMultiple")*/) { // Elastic tables can use DeleteMultiple for better performance than ExecuteMultiple var entities = new EntityReferenceCollection();