diff options
| author | JPVenson <github@jpb.email> | 2024-11-12 15:37:01 +0000 |
|---|---|---|
| committer | JPVenson <github@jpb.email> | 2024-11-12 15:37:01 +0000 |
| commit | 85b8b2573bc3d99385f25c40c57027bb5112b323 (patch) | |
| tree | 5a102c5250bb71ae01e4e9c60b9069d273a72b16 /Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs | |
| parent | a7a2257ccbda10cdfe1112fefb8391c8f2d698d0 (diff) | |
Fixed AncestorIds
Fixed Sorting, NextUp and Continue Watching
Diffstat (limited to 'Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs b/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs index fe5cf30ac..8cc817fb8 100644 --- a/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs +++ b/Jellyfin.Server.Implementations/ModelConfiguration/AncestorIdConfiguration.cs @@ -15,7 +15,7 @@ public class AncestorIdConfiguration : IEntityTypeConfiguration<AncestorId> { builder.HasKey(e => new { e.ItemId, e.ParentItemId }); builder.HasIndex(e => e.ParentItemId); - builder.HasOne(e => e.ParentItem); - builder.HasOne(e => e.Item); + builder.HasOne(e => e.ParentItem).WithMany(e => e.ParentAncestors).HasForeignKey(f => f.ParentItemId); + builder.HasOne(e => e.Item).WithMany(e => e.Children).HasForeignKey(f => f.ItemId); } } |
