mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-11 10:10:35 +01:00
Fix ancestors (#13827)
This commit is contained in:
@@ -164,7 +164,7 @@ public class BaseItemEntity
|
||||
|
||||
public ICollection<BaseItemProvider>? Provider { get; set; }
|
||||
|
||||
public ICollection<AncestorId>? ParentAncestors { get; set; }
|
||||
public ICollection<AncestorId>? Parents { get; set; }
|
||||
|
||||
public ICollection<AncestorId>? Children { get; set; }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class AncestorIdConfiguration : IEntityTypeConfiguration<AncestorId>
|
||||
{
|
||||
builder.HasKey(e => new { e.ItemId, e.ParentItemId });
|
||||
builder.HasIndex(e => e.ParentItemId);
|
||||
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);
|
||||
builder.HasOne(e => e.ParentItem).WithMany(e => e.Children).HasForeignKey(f => f.ParentItemId);
|
||||
builder.HasOne(e => e.Item).WithMany(e => e.Parents).HasForeignKey(f => f.ItemId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BaseItemConfiguration : IEntityTypeConfiguration<BaseItemEntity>
|
||||
builder.HasMany(e => e.MediaStreams);
|
||||
builder.HasMany(e => e.Chapters);
|
||||
builder.HasMany(e => e.Provider);
|
||||
builder.HasMany(e => e.ParentAncestors);
|
||||
builder.HasMany(e => e.Parents);
|
||||
builder.HasMany(e => e.Children);
|
||||
builder.HasMany(e => e.LockedFields);
|
||||
builder.HasMany(e => e.TrailerTypes);
|
||||
|
||||
Reference in New Issue
Block a user