Fix for #3296: Adding comments

This commit is contained in:
Warwick Buzacott
2018-10-26 09:42:09 +11:00
committed by Sebastiaan Janssen
parent a09660128a
commit 557905580b

View File

@@ -385,11 +385,15 @@ namespace Umbraco.Core.Persistence.Repositories
if (orderDirection == Direction.Descending)
{
sortedSql.OrderByDescending("CustomPropData.CustomPropVal");
// need to ensure ordering unique by using id as CustomPropVal may not be unique
// see: https://github.com/umbraco/Umbraco-CMS/issues/3296
sortedSql.OrderByDescending("umbracoNode.id");
}
else
{
sortedSql.OrderBy("CustomPropData.CustomPropVal");
// need to ensure ordering unique by using id as CustomPropVal may not be unique
// see: https://github.com/umbraco/Umbraco-CMS/issues/3296
sortedSql.OrderBy("umbracoNode.id");
}
}