mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix removal of FileInfo, BeatmapMetadata, BeatmapDifficulty objects
This commit is contained in:
@ -73,6 +73,11 @@ namespace osu.Game.Beatmaps
|
||||
if (beatmapSet.DeletePending) return false;
|
||||
|
||||
beatmapSet.DeletePending = true;
|
||||
|
||||
// We can't use one to one relationship with its cascade delete because FileInfo can be used not only inside of BeatmapSetFileInfo
|
||||
var files = beatmapSet.Files.Select(beatmapSetFileInfo => beatmapSetFileInfo.FileInfo);
|
||||
Connection.FileInfo.RemoveRange(files);
|
||||
|
||||
Connection.BeatmapSetInfo.Remove(beatmapSet);
|
||||
Connection.SaveChanges();
|
||||
|
||||
|
Reference in New Issue
Block a user