From 8e3a9780d668066562f4bed8f96b399deb22bbe9 Mon Sep 17 00:00:00 2001 From: Louis-Axel Ambroise Date: Thu, 10 Nov 2022 20:42:10 +0100 Subject: [PATCH] Fix subscriptions with EFCore 7 --- .../Store/Configuration/EpcisModelConfiguration.cs | 2 +- src/FasTnT.Domain/Constants.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FasTnT.Application.EfCore/Store/Configuration/EpcisModelConfiguration.cs b/src/FasTnT.Application.EfCore/Store/Configuration/EpcisModelConfiguration.cs index 6ed99541..9d35c182 100644 --- a/src/FasTnT.Application.EfCore/Store/Configuration/EpcisModelConfiguration.cs +++ b/src/FasTnT.Application.EfCore/Store/Configuration/EpcisModelConfiguration.cs @@ -218,7 +218,7 @@ internal static void Apply(ModelBuilder modelBuilder, DatabaseFacade database) sensorReport.HasOne(x => x.SensorElement).WithMany(x => x.Reports).HasForeignKey("EventId", "SensorId").OnDelete(DeleteBehavior.Cascade); var subscription = modelBuilder.Entity(); - subscription.ToTable(nameof(Subscription), nameof(EpcisSchema.Subscription)); + subscription.ToTable(nameof(Subscription), nameof(EpcisSchema.Subscription), builder => builder.HasTrigger("[Subscription].[SubscriptionInitialRequests]")); subscription.Property(x => x.Name).IsRequired(true).HasMaxLength(256); subscription.Property(x => x.QueryName).IsRequired(true).HasMaxLength(256); subscription.Property(x => x.ReportIfEmpty).IsRequired(true); diff --git a/src/FasTnT.Domain/Constants.cs b/src/FasTnT.Domain/Constants.cs index bdb218e7..1a3d7e2a 100644 --- a/src/FasTnT.Domain/Constants.cs +++ b/src/FasTnT.Domain/Constants.cs @@ -6,5 +6,5 @@ public sealed class Constants public int MaxEventsCapturePerCall { get; init; } = 500; public int MaxEventsReturnedInQuery { get; init; } = 20_000; - public string VendorVersion { get; init; } = "2.2.0"; + public string VendorVersion { get; init; } = "2.2.1"; }