Skip to content

Commit

Permalink
fixed 修复 DAO 配置了 loadColumns 时又配置了 distinct 时,无法获得正确结果的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfuhai committed May 17, 2022
1 parent f005264 commit f3b045c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/jboot/db/model/JbootModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ private String getLoadColumns(String loadColumns) {

//用户配置的 loadColumns 未包含 distinct 关键字
if (!loadColumns.toLowerCase().contains("distinct ")) {
loadColumns = "DISTINCT " + distinctColumn + "," + loadColumns;
loadColumns = "DISTINCT " + distinctColumn + ", " + loadColumns;
}
}
}
Expand Down

0 comments on commit f3b045c

Please sign in to comment.