From 40cd66852e8d3a5d56c56b9d279cb89a98e3c16d Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Thu, 25 Jul 2019 14:20:12 -0300 Subject: [PATCH] BUGFIX: Fixed issue where multiple relationship sort order columns would be lost in favor of only the last relationship column in the sort order --- src/ORM/DataQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/DataQuery.php b/src/ORM/DataQuery.php index 2b4224be7..6ca70c13e 100644 --- a/src/ORM/DataQuery.php +++ b/src/ORM/DataQuery.php @@ -403,7 +403,7 @@ class DataQuery // Find the first free "_SortColumnX" slot // and assign it to $key $i = 0; - while (isset($orderby[$key = "\"_SortColumn$i\""])) { + while (isset($newOrderby[$key = "\"_SortColumn$i\""]) || isset($orderby[$key = "\"_SortColumn$i\""])) { ++$i; }