1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Perform a reload on objects when Refreshing them

Previously, it was possible for an object to be "refreshed" with a stale cached state from the current thread's context.

This ensures a check against the database is performed as well.

Resolves #1562.
This commit is contained in:
Dean Herbert 2017-11-23 17:03:56 +09:00
parent 1824540325
commit 85827f83eb

View File

@ -35,6 +35,7 @@ namespace osu.Game.Database
var id = obj.ID;
obj = lookupSource?.SingleOrDefault(t => t.ID == id) ?? context.Find<T>(id);
context.Entry(obj).Reload();
}
/// <summary>