Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5261ec commit 324fe32Copy full SHA for 324fe32
APIJSONORM/src/main/java/apijson/orm/SQLConfig.java
@@ -354,7 +354,8 @@ default String getSQLAlias() {
354
return getSQLAlias(getTable(), getAlias());
355
}
356
static String getSQLAlias(@NotNull String table, String alias) {
357
- return StringUtil.isEmpty(alias) ? table : table + "_" + alias; // 带上原表名,避免 alias 和其它表名/字段名冲突
+ // 这里不用 : $ 等符号,因为部分数据库/引擎似乎不支持 `key`, "key", [key] 等避免关键词冲突的方式,只能使用符合变量命名的表别名
358
+ return StringUtil.isEmpty(alias) ? table : table + "__" + alias; // 带上原表名,避免 alias 和其它表名/字段名冲突
359
360
361
0 commit comments