mirror of https://github.com/Radarr/Radarr
Fixed: Solved database performance bug causing slow rss syncs.
This commit is contained in:
parent
adcd296153
commit
4540cf05ad
|
@ -14,8 +14,12 @@ namespace NzbDrone.Core.Datastore.Extensions
|
||||||
{
|
{
|
||||||
return relationshipBuilder.For(portalExpression.GetMemberName())
|
return relationshipBuilder.For(portalExpression.GetMemberName())
|
||||||
.LazyLoad(
|
.LazyLoad(
|
||||||
query: (db, parent) => db.Query<TChild>().SingleOrDefault(c => c.Id == childIdSelector(parent)),
|
condition: parent => childIdSelector(parent) > 0,
|
||||||
condition: parent => childIdSelector(parent) > 0
|
query: (db, parent) =>
|
||||||
|
{
|
||||||
|
var id = childIdSelector(parent);
|
||||||
|
return db.Query<TChild>().Where(c => c.Id == id).SingleOrDefault();
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue