mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing distinct root transformation
The [Aggregate] attribute might be used and the QueryHints might not reflect it. --HG-- branch : 1.x
This commit is contained in:
@@ -303,7 +303,7 @@ namespace Orchard.ContentManagement {
|
|||||||
hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemCriteria.UnderlyingCriteria, ExtendCriteria);
|
hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemCriteria.UnderlyingCriteria, ExtendCriteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hintDictionary.SelectMany(x => x.Value).Any(x => x.Segments.Count() > 1))
|
// if (hintDictionary.SelectMany(x => x.Value).Any(x => x.Segments.Count() > 1))
|
||||||
contentItemVersionCriteria.TransformUsing(new DistinctRootEntityResultTransformer());
|
contentItemVersionCriteria.TransformUsing(new DistinctRootEntityResultTransformer());
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user