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:
Sebastien Ros
2012-08-16 15:18:10 -07:00
parent ac29256af4
commit 600a8c00fe

View File

@@ -303,7 +303,7 @@ namespace Orchard.ContentManagement {
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());
return this;