mirror of https://github.com/elunez/eladmin
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-jpapull/745/head
parent
d4ae410929
commit
68608b28e3
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue