Fixing wrong random queries cacheable flag assignment

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-07-08 09:59:52 -07:00
parent 0266eb205f
commit 8d775ab93f

View File

@@ -219,12 +219,12 @@ namespace Orchard.ContentManagement {
sort.Item2(sortFactory);
if (!sortFactory.Randomize) {
cacheable = false;
sb.Append(", ");
sb.Append(sort.Item1.Name).Append(".").Append(sortFactory.PropertyName);
}
else {
// select distinct can't be used with newid()
cacheable = false;
sb.Replace("select distinct", "select ");
}
}