From abd0f3fbf3c47068f800b51f775c2c7064675ef0 Mon Sep 17 00:00:00 2001 From: Mason Dechaineux Date: Fri, 21 Aug 2020 09:25:27 +1000 Subject: [PATCH] Fix DataList->column mutating underlying DataQuery --- src/ORM/DataList.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ORM/DataList.php b/src/ORM/DataList.php index b494c7441..26069cb3a 100644 --- a/src/ORM/DataList.php +++ b/src/ORM/DataList.php @@ -1014,7 +1014,8 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li */ public function column($colName = "ID") { - return $this->dataQuery->distinct(false)->column($colName); + $dataQuery = clone $this->dataQuery; + return $dataQuery->distinct(false)->column($colName); } /**