diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt index 64e0d73b8..fd9530443 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/ReferentialDao.kt @@ -171,7 +171,7 @@ class ReferentialDao( dsl.selectDistinct(bma.RELEASE_DATE) .from(bma) .where(bma.RELEASE_DATE.isNotNull) - .orderBy(bma.RELEASE_DATE) + .orderBy(bma.RELEASE_DATE.desc()) .fetchSet(bma.RELEASE_DATE) override fun findAllSeriesReleaseDatesByLibrary(libraryId: String): Set = @@ -180,7 +180,7 @@ class ReferentialDao( .leftJoin(s).on(bma.SERIES_ID.eq(s.ID)) .where(s.LIBRARY_ID.eq(libraryId)) .and(bma.RELEASE_DATE.isNotNull) - .orderBy(bma.RELEASE_DATE) + .orderBy(bma.RELEASE_DATE.desc()) .fetchSet(bma.RELEASE_DATE) override fun findAllSeriesReleaseDatesByCollection(collectionId: String): Set = @@ -189,6 +189,6 @@ class ReferentialDao( .leftJoin(cs).on(bma.SERIES_ID.eq(cs.SERIES_ID)) .where(cs.COLLECTION_ID.eq(collectionId)) .and(bma.RELEASE_DATE.isNotNull) - .orderBy(bma.RELEASE_DATE) + .orderBy(bma.RELEASE_DATE.desc()) .fetchSet(bma.RELEASE_DATE) }