From 0c3f9d5ed5bc06fb9df6c5e36ca951157069303e Mon Sep 17 00:00:00 2001 From: Ishan Jayamanne Date: Fri, 1 Nov 2024 18:12:12 +1300 Subject: [PATCH] add sort by ID to the createDataList --- src/DataObject/DataObjectFetcher.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DataObject/DataObjectFetcher.php b/src/DataObject/DataObjectFetcher.php index f1afa28..5715cc7 100644 --- a/src/DataObject/DataObjectFetcher.php +++ b/src/DataObject/DataObjectFetcher.php @@ -88,7 +88,9 @@ private function createDataList(?int $limit = null, ?int $offset = null): DataLi { $list = DataList::create($this->dataObjectClass); - return $list->limit($limit, $offset); + return $list + ->sort('ID', 'ASC') + ->limit($limit, $offset); } }