Merge pull request #15812 from peppy/realm-live-unmanaged-fetch-fix

Avoid attempting to fetch a non-managed `RealmLive` instance from the realm backing
This commit is contained in:
Dan Balasescu
2021-11-26 15:37:58 +09:00
committed by GitHub
4 changed files with 41 additions and 4 deletions

View File

@ -11,6 +11,7 @@ namespace osu.Game.Database
{
public EntityFrameworkLive(T item)
{
IsManaged = true; // no way to really know.
Value = item;
}
@ -31,6 +32,8 @@ namespace osu.Game.Database
perform(Value);
}
public bool IsManaged { get; }
public T Value { get; }
public bool Equals(ILive<T>? other) => ID == other?.ID;