From 2b527091f0ebe056c4b0aa7fe020c13ba84594e2 Mon Sep 17 00:00:00 2001 From: bayang Date: Wed, 4 Sep 2024 13:33:46 +0200 Subject: [PATCH] fix: series sort #135 --- src/main/kotlin/io/github/bayang/jelu/dao/BookRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/io/github/bayang/jelu/dao/BookRepository.kt b/src/main/kotlin/io/github/bayang/jelu/dao/BookRepository.kt index be609411..4d111efa 100644 --- a/src/main/kotlin/io/github/bayang/jelu/dao/BookRepository.kt +++ b/src/main/kotlin/io/github/bayang/jelu/dao/BookRepository.kt @@ -436,7 +436,7 @@ class BookRepository( query.withDistinct(true) val total = query.count() query.limit(pageable.pageSize, pageable.offset) - val orders: Array, SortOrder>> = parseSorts(pageable.sort, Pair(BookTable.title, SortOrder.ASC_NULLS_LAST), BookTable) + val orders: Array, SortOrder>> = parseSorts(pageable.sort, Pair(BookTable.title, SortOrder.ASC_NULLS_LAST), BookSeries, BookTable) query.orderBy(*orders) return PageImpl( query.map { resultRow -> wrapRow(resultRow, user.id.value) },