Fix ORDER BY DESC with COLLATE
@@ -122,9 +122,8 @@ public class OOrderByItem {
}
if (collateStrategy != null) {
- return collateStrategy.compareForOrderBy(aVal, bVal);
- }
-
+ result = collateStrategy.compareForOrderBy(aVal, bVal);
+ } else {
if (aVal == null) {
if (bVal == null) {
result = 0;
@@ -141,6 +140,7 @@ public class OOrderByItem {
result = 0;
}
}
+ }
if (type == DESC) {
result = -1 * result;
}
