From 2d69b30e83206484f1e23eab8e532ab5f12cbc49 Mon Sep 17 00:00:00 2001 From: Glax Date: Fri, 9 May 2025 12:03:18 +0200 Subject: [PATCH] Fix missing Entity-Relation for UpdateFilesDownloadedJob --- API/Schema/PgsqlContext.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/API/Schema/PgsqlContext.cs b/API/Schema/PgsqlContext.cs index b3995bb..c7cbbb9 100644 --- a/API/Schema/PgsqlContext.cs +++ b/API/Schema/PgsqlContext.cs @@ -87,6 +87,15 @@ public class PgsqlContext(DbContextOptions options) : DbContext(op modelBuilder.Entity() .Navigation(j => j.Manga) .AutoInclude(); + modelBuilder.Entity() + .HasOne(j => j.Manga) + .WithMany() + .HasForeignKey(j => j.MangaId) + .IsRequired() + .OnDelete(DeleteBehavior.Cascade); + modelBuilder.Entity() + .Navigation(j => j.Manga) + .AutoInclude(); //Job has possible ParentJob modelBuilder.Entity()