From 5d94acfe1f0e8266e99197d12e777c7373c8ff55 Mon Sep 17 00:00:00 2001 From: sven-n Date: Mon, 5 Aug 2024 19:10:48 +0200 Subject: [PATCH] Specify one-to-many to prevent unneeded foreign key generation --- .../Extensions/ModelBuilder/MonsterExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Persistence/EntityFramework/Extensions/ModelBuilder/MonsterExtensions.cs b/src/Persistence/EntityFramework/Extensions/ModelBuilder/MonsterExtensions.cs index afba11a5d..0457eb866 100644 --- a/src/Persistence/EntityFramework/Extensions/ModelBuilder/MonsterExtensions.cs +++ b/src/Persistence/EntityFramework/Extensions/ModelBuilder/MonsterExtensions.cs @@ -28,6 +28,6 @@ public static void Apply(this EntityTypeBuilder builder) public static void Apply(this EntityTypeBuilder builder) { builder.HasOne(spawn => spawn.RawMonsterDefinition); - builder.HasOne(spawn => spawn.RawGameMap); + builder.HasOne(spawn => spawn.RawGameMap).WithMany(map => map.RawMonsterSpawns); } }