Skip to content

Commit

Permalink
fix: 修复BaseMapper方法中未生成javaType属性导致无法携带字段类型实例化typeHandler。close mybat…
Browse files Browse the repository at this point in the history
  • Loading branch information
L1yp committed Nov 5, 2024
1 parent 00a0a7f commit ebf95ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/io/mybatis/provider/EntityColumn.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,22 @@ public String variables() {
public String variables(String prefix) {
return "#{" + property(prefix)
+ jdbcTypeVariables().orElse("")
+ javaTypeVariables().orElse("")
+ typeHandlerVariables().orElse("")
+ numericScaleVariables().orElse("") + "}";
}

/**
* java类型 {, javaType=java.lang.String}
*/
public Optional<String> javaTypeVariables() {
Class<?> javaType = this.javaType();
if (javaType != null) {
return Optional.of(", javaType=" + javaType.getName());
}
return Optional.empty();
}

/**
* 数据库类型 {, jdbcType=VARCHAR}
*/
Expand Down

0 comments on commit ebf95ee

Please sign in to comment.