From f67a48005b939a7a08c603c8a1ba570357674a00 Mon Sep 17 00:00:00 2001 From: "yd.2" Date: Wed, 27 Nov 2024 16:24:07 +0900 Subject: [PATCH] Fix SQL generation for query with sorting --- .../spring/data/jdbc/plus/sql/convert/SqlGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-data-jdbc-plus-sql/src/main/java/com/navercorp/spring/data/jdbc/plus/sql/convert/SqlGenerator.java b/spring-data-jdbc-plus-sql/src/main/java/com/navercorp/spring/data/jdbc/plus/sql/convert/SqlGenerator.java index f64a56e..41bb786 100644 --- a/spring-data-jdbc-plus-sql/src/main/java/com/navercorp/spring/data/jdbc/plus/sql/convert/SqlGenerator.java +++ b/spring-data-jdbc-plus-sql/src/main/java/com/navercorp/spring/data/jdbc/plus/sql/convert/SqlGenerator.java @@ -1304,7 +1304,7 @@ private SelectBuilder.SelectOrdered applyQueryOnSelect(Query query, MapSqlParame if (query.isSorted()) { List sort = this.queryMapper.getMappedSort(table, query.getSort(), entity); - selectOrdered = selectBuilder.orderBy(sort); + selectOrdered = selectOrdered.orderBy(sort); } SelectBuilder.SelectLimitOffset limitable = (SelectBuilder.SelectLimitOffset)selectOrdered;