From 09e6ffcd993c2e0db643780919cc17ed300d38de Mon Sep 17 00:00:00 2001 From: "Jeremy D. Miller" Date: Wed, 25 Sep 2024 11:12:52 -0500 Subject: [PATCH] Fix for the combo of managed list partition tables and the command line usage for patching --- Directory.Build.props | 2 +- src/Marten.CommandLine/Marten.CommandLine.csproj | 2 +- src/Marten/Marten.csproj | 2 +- src/Marten/Schema/MartenManagedTenantListPartitions.cs | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index c3afe87e15..973903ba79 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 7.28.1 + 7.28.2 12.0 Jeremy D. Miller;Babu Annamalai;Oskar Dudycz;Joona-Pekka Kokko https://martendb.io/logo.png diff --git a/src/Marten.CommandLine/Marten.CommandLine.csproj b/src/Marten.CommandLine/Marten.CommandLine.csproj index 127b90fd94..424dd838bc 100644 --- a/src/Marten.CommandLine/Marten.CommandLine.csproj +++ b/src/Marten.CommandLine/Marten.CommandLine.csproj @@ -36,7 +36,7 @@ - + diff --git a/src/Marten/Marten.csproj b/src/Marten/Marten.csproj index b9f78ff081..0978cd6143 100644 --- a/src/Marten/Marten.csproj +++ b/src/Marten/Marten.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/Marten/Schema/MartenManagedTenantListPartitions.cs b/src/Marten/Schema/MartenManagedTenantListPartitions.cs index 3de63f7c53..680205e2bd 100644 --- a/src/Marten/Schema/MartenManagedTenantListPartitions.cs +++ b/src/Marten/Schema/MartenManagedTenantListPartitions.cs @@ -3,6 +3,7 @@ using System.Threading; using System.Threading.Tasks; using JasperFx.Core.Reflection; +using Marten.Events; using Marten.Storage; using Marten.Storage.Metadata; using Npgsql; @@ -35,7 +36,9 @@ public MartenManagedTenantListPartitions(StoreOptions options, string? schemaNam public void Apply(DocumentMapping mapping) { - if (mapping.TenancyStyle == TenancyStyle.Conjoined || mapping.DocumentType.HasAttribute()) + if (mapping is EventQueryMapping) return; + + if (mapping.TenancyStyle == TenancyStyle.Conjoined && !mapping.DocumentType.HasAttribute()) { mapping.Partitioning = new ListPartitioning { Columns = [TenantIdColumn.Name] }.UsePartitionManager(Partitions);