Revert EF Core to version 2.2

This reverts commit f3faad74d5, reversing
changes made to 712e7bc7bf.

Several issues arose after migrating to 5.0, including, but possibly not
limited to, performance regressions in song select, as well as failures
when attempting to save beatmaps after metadata changes in the editor.
This commit is contained in:
Bartłomiej Dach
2021-03-21 11:01:06 +01:00
parent 0bb6fbdd38
commit a16c0641b2
18 changed files with 30 additions and 109 deletions

View File

@ -462,8 +462,6 @@ namespace osu.Game.Database
// Dereference the existing file info, since the file model will be removed.
if (file.FileInfo != null)
{
file.Requery(usage.Context);
Files.Dereference(file.FileInfo);
// This shouldn't be required, but here for safety in case the provided TModel is not being change tracked
@ -637,12 +635,10 @@ namespace osu.Game.Database
{
using (Stream s = reader.GetStream(file))
{
var fileInfo = files.Add(s);
fileInfos.Add(new TFileModel
{
Filename = file.Substring(prefix.Length).ToStandardisedPath(),
FileInfo = fileInfo,
FileInfoID = fileInfo.ID // workaround for efcore 5 compatibility.
FileInfo = files.Add(s)
});
}
}