From 68f93dbb107d746c17ed487706f4ec73e71dd058 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 3 May 2013 00:28:02 -0700 Subject: [PATCH] LazyLoaded Series and Episode again for history --- NzbDrone.Api/History/HistoryModule.cs | 4 ++-- NzbDrone.Core/Datastore/TableMapping.cs | 8 ++++---- NzbDrone.Core/History/History.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NzbDrone.Api/History/HistoryModule.cs b/NzbDrone.Api/History/HistoryModule.cs index 0e6a34af2..36dec0e00 100644 --- a/NzbDrone.Api/History/HistoryModule.cs +++ b/NzbDrone.Api/History/HistoryModule.cs @@ -65,8 +65,8 @@ namespace NzbDrone.Api.History { Id = 1, Date = DateTime.UtcNow.AddHours(-5), - Episode = episode, - Series = series, +// Episode = episode, +// Series = series, Indexer = "nzbs.org", Quality = new QualityModel(Quality.HDTV720p) } diff --git a/NzbDrone.Core/Datastore/TableMapping.cs b/NzbDrone.Core/Datastore/TableMapping.cs index d9bbeed66..30772cfe6 100644 --- a/NzbDrone.Core/Datastore/TableMapping.cs +++ b/NzbDrone.Core/Datastore/TableMapping.cs @@ -38,10 +38,10 @@ namespace NzbDrone.Core.Datastore Mapper.Entity().RegisterModel("SceneMappings"); - Mapper.Entity().RegisterModel("History"); -// .Relationship() -// .HasOne(h => h.Episode, h => h.EpisodeId) -// .HasOne(h => h.Series, h => h.SeriesId); + Mapper.Entity().RegisterModel("History") + .Relationship() + .HasOne(h => h.Episode, h => h.EpisodeId) + .HasOne(h => h.Series, h => h.SeriesId); Mapper.Entity().RegisterModel("Series") .Ignore(s => s.Path) diff --git a/NzbDrone.Core/History/History.cs b/NzbDrone.Core/History/History.cs index e248fdd7b..b11fa4f83 100644 --- a/NzbDrone.Core/History/History.cs +++ b/NzbDrone.Core/History/History.cs @@ -17,7 +17,7 @@ namespace NzbDrone.Core.History public string NzbInfoUrl { get; set; } public string ReleaseGroup { get; set; } - public Episode Episode { get; set; } - public Series Series { get; set; } + public LazyLoaded Episode { get; set; } + public LazyLoaded Series { get; set; } } } \ No newline at end of file