Ensure deletions are correct without relying on FK cascade rule

This commit is contained in:
Dean Herbert 2019-03-01 10:47:45 +09:00
parent d4041d5d42
commit 0300f0d665
1 changed files with 4 additions and 0 deletions

View File

@ -19,5 +19,9 @@ protected MutableDatabaseBackedStoreWithFileIncludes(IDatabaseContextFactory con
protected override IQueryable<T> AddIncludesForConsumption(IQueryable<T> query) =>
base.AddIncludesForConsumption(query)
.Include(s => s.Files).ThenInclude(f => f.FileInfo);
protected override IQueryable<T> AddIncludesForDeletion(IQueryable<T> query) =>
base.AddIncludesForDeletion(query)
.Include(s => s.Files); // don't include FileInfo. these are handled by the FileStore itself.
}
}