mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
fixed history->episode relationship.
This commit is contained in:
parent
e0b881fe4b
commit
a2b91b469e
3 changed files with 32 additions and 13 deletions
|
@ -40,7 +40,7 @@ namespace NzbDrone.Core.Datastore
|
|||
Mapper.Entity<History.History>().RegisterModel("History")
|
||||
.Relationships.AutoMapComplexTypeProperties<ILazyLoaded>()
|
||||
.For(c => c.Episode)
|
||||
.LazyLoad((db, history) => db.Query<Episode>().Where(ep => ep.Id == history.Id).ToList());
|
||||
.LazyLoad((db, history) => db.Query<Episode>().Single(ep => ep.Id == history.EpisodeId));
|
||||
|
||||
Mapper.Entity<Series>().RegisterModel("Series")
|
||||
.Relationships.AutoMapComplexTypeProperties<ILazyLoaded>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue