Needed to be fixed, just like for the ascending OrderBy - see U4-4474

This commit is contained in:
Sebastiaan Janssen
2016-08-03 17:52:27 +02:00
parent 00bc454080
commit c53a04d658

View File

@@ -77,7 +77,8 @@ namespace Umbraco.Core.Persistence
var type = typeof(TColumn);
var tableName = type.GetTableName();
var syntax = string.Format("{0}.{1} DESC",
//need to ensure the order by is in brackets, see: https://github.com/toptensoftware/PetaPoco/issues/177
var syntax = string.Format("({0}.{1}) DESC",
sqlSyntax.GetQuotedTableName(tableName),
sqlSyntax.GetQuotedColumnName(columnName));