Skip to content

Commit 1144a21

Browse files
committed
修改日期 : 2021-10-07
背景 : jpa 模板文件生成的 表名 和 输入的 sql 语句不一致,导致 从 数据库客户端直接复制下来的 create 语句 经过 生成代码 工具生成的 实体类 文件需要修改表名 才能够使用 修改 : 1 jpa.entity.ftl 将 table_name 统一 改为 originaltablename
1 parent 1c6efb4 commit 1144a21

File tree

1 file changed

+1
-1
lines changed
  • generator-web/src/main/resources/templates/code-generator/jpa

1 file changed

+1
-1
lines changed

generator-web/src/main/resources/templates/code-generator/jpa/entity.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import io.swagger.annotations.ApiModelProperty;</#if>
2121
*/
2222
@Entity
2323
<#if isLombok?exists && isLombok==true>@Data</#if>
24-
<#if isComment?exists && isComment==true>@Table(name="${classInfo.tableName}")</#if><#if isSwagger?exists && isSwagger==true>
24+
<#if isComment?exists && isComment==true>@Table(name="${classInfo.originTableName}")</#if><#if isSwagger?exists && isSwagger==true>
2525
@ApiModel("${classInfo.classComment}")</#if>
2626
public class ${classInfo.className} implements Serializable {
2727

0 commit comments

Comments
 (0)