Switch guid to store as string until fody issues are resolved

See
https://github.com/realm/realm-dotnet/issues/740#issuecomment-755898968
This commit is contained in:
Dean Herbert
2021-01-07 15:41:58 +09:00
parent ae76eca564
commit 845d5cdea2
3 changed files with 12 additions and 4 deletions

View File

@ -4,13 +4,22 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Realms;
namespace osu.Game.Database
{
public interface IHasGuidPrimaryKey
{
[JsonIgnore]
[Ignored]
public Guid Guid
{
get => new Guid(ID);
set => ID = value.ToString();
}
[JsonIgnore]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
Guid ID { get; set; }
string ID { get; set; }
}
}