diff --git a/eZ/Publish/API/Repository/Values/Content/Query/SortClause/BookmarkId.php b/eZ/Publish/API/Repository/Values/Content/Query/SortClause/BookmarkId.php new file mode 100644 index 0000000000..7b32cfb456 --- /dev/null +++ b/eZ/Publish/API/Repository/Values/Content/Query/SortClause/BookmarkId.php @@ -0,0 +1,29 @@ +addOrderBy('bookmark.id', $sortClause->direction); + } +} diff --git a/eZ/Publish/Core/Repository/BookmarkService.php b/eZ/Publish/Core/Repository/BookmarkService.php index 266d0d8fa5..bf9914289f 100644 --- a/eZ/Publish/Core/Repository/BookmarkService.php +++ b/eZ/Publish/Core/Repository/BookmarkService.php @@ -104,7 +104,7 @@ public function loadBookmarks(int $offset = 0, int $limit = 25): BookmarkList try { $filter ->withCriterion(new Criterion\Bookmark($currentUserId)) - ->withSortClause(new SortClause\DatePublished(Query::SORT_DESC)) + ->withSortClause(new SortClause\BookmarkId(Query::SORT_DESC)) ->sliceBy($limit, $offset); $result = $this->repository->getlocationService()->find($filter, []);