LazyLoaded Series and Episode again for history

This commit is contained in:
Mark McDowall 2013-05-03 00:28:02 -07:00
parent 17e99958e1
commit 68f93dbb10
3 changed files with 8 additions and 8 deletions

View File

@ -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)
}

View File

@ -38,10 +38,10 @@ namespace NzbDrone.Core.Datastore
Mapper.Entity<SceneMapping>().RegisterModel("SceneMappings");
Mapper.Entity<History.History>().RegisterModel("History");
// .Relationship()
// .HasOne(h => h.Episode, h => h.EpisodeId)
// .HasOne(h => h.Series, h => h.SeriesId);
Mapper.Entity<History.History>().RegisterModel("History")
.Relationship()
.HasOne(h => h.Episode, h => h.EpisodeId)
.HasOne(h => h.Series, h => h.SeriesId);
Mapper.Entity<Series>().RegisterModel("Series")
.Ignore(s => s.Path)

View File

@ -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> Episode { get; set; }
public LazyLoaded<Series> Series { get; set; }
}
}