mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 23:42:55 +08:00
Fix cascading inserts.
This commit is contained in:
parent
42f8d19c73
commit
ee6c810df5
@ -11,17 +11,23 @@ namespace osu.Game.Database
|
||||
{
|
||||
[PrimaryKey]
|
||||
public int BeatmapID { get; set; }
|
||||
|
||||
[ForeignKey(typeof(BeatmapSetInfo))]
|
||||
public int BeatmapSetID { get; set; }
|
||||
|
||||
[ManyToOne]
|
||||
public BeatmapSetInfo BeatmapSet { get; set; }
|
||||
|
||||
[ForeignKey(typeof(BeatmapMetadata))]
|
||||
public int BeatmapMetadataID { get; set; }
|
||||
|
||||
[OneToOne(CascadeOperations = CascadeOperation.All)]
|
||||
public BeatmapMetadata Metadata { get; set; }
|
||||
|
||||
[ForeignKey(typeof(BaseDifficulty)), NotNull]
|
||||
public int BaseDifficultyID { get; set; }
|
||||
[OneToOne]
|
||||
public BeatmapMetadata Metadata { get; set; }
|
||||
[OneToOne]
|
||||
|
||||
[OneToOne(CascadeOperations = CascadeOperation.All)]
|
||||
public BaseDifficulty BaseDifficulty { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
@ -9,13 +9,18 @@ namespace osu.Game.Database
|
||||
{
|
||||
[PrimaryKey]
|
||||
public int BeatmapSetID { get; set; }
|
||||
[OneToOne]
|
||||
|
||||
[OneToOne(CascadeOperations = CascadeOperation.All)]
|
||||
public BeatmapMetadata Metadata { get; set; }
|
||||
|
||||
[NotNull, ForeignKey(typeof(BeatmapMetadata))]
|
||||
public int BeatmapMetadataID { get; set; }
|
||||
[OneToMany]
|
||||
|
||||
[OneToMany(CascadeOperations = CascadeOperation.All)]
|
||||
public List<BeatmapInfo> Beatmaps { get; set; }
|
||||
|
||||
public string Hash { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user