Unverified Commit 68608b28 authored by Aborn Jiang's avatar Aborn Jiang Committed by GitHub
Browse files

Column use `` for reserved key (#743)

* fix weird prefixes keys when use RedisUtils.scan

* Column use `` for reserved key

ref: https://stackoverflow.com/questions/2224503/how-to-map-an-entity-field-whose-name-is-a-reserved-word-in-jpa
parent d4ae4109
......@@ -55,7 +55,7 @@ public class ${className} implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
</#if>
</#if>
@Column(name = "${column.columnName}"<#if column.columnKey = 'UNI'>,unique = true</#if><#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false</#if>)
@Column(name = "`${column.columnName}`"<#if column.columnKey = 'UNI'>,unique = true</#if><#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false</#if>)
<#if column.istNotNull && column.columnKey != 'PRI'>
<#if column.columnType = 'String'>
@NotBlank
......@@ -82,4 +82,4 @@ public class ${className} implements Serializable {
public void copy(${className} source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}
\ No newline at end of file
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment