Commit a212a30e authored by Quxl's avatar Quxl

x

parent bb4ee4c7
...@@ -43,27 +43,25 @@ public class Desc { ...@@ -43,27 +43,25 @@ public class Desc {
} }
int mod = field.getModifiers(); int mod = field.getModifiers();
if(!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) { if(!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) {
if(!field.isAnnotationPresent(Transient.class)) { String fieldName = field.getName();
String fieldName = field.getName(); String columnName = null;
String columnName = null; if(field.isAnnotationPresent(Column.class)) {
if(field.isAnnotationPresent(Column.class)) { Column column = field.getAnnotation(Column.class);
Column column = field.getAnnotation(Column.class); String columnAnnoName = column.name();
String columnAnnoName = column.name(); if(StringUtil.isNotBlank(columnAnnoName)) {
if(StringUtil.isNotBlank(columnAnnoName)) { columnName = columnAnnoName;
columnName = columnAnnoName;
} else {
columnName = fieldName;
}
} else { } else {
columnName = fieldName; columnName = fieldName;
} }
if(field.isAnnotationPresent(Id.class)) { } else {
pk_field_names.add(fieldName); columnName = fieldName;
pk_column_names.add(columnName); }
} if(field.isAnnotationPresent(Id.class)) {
all_field_names.add(fieldName); pk_field_names.add(fieldName);
all_column_names.add(columnName); pk_column_names.add(columnName);
} }
all_field_names.add(fieldName);
all_column_names.add(columnName);
} }
} }
this.name = tableName; this.name = tableName;
......
Markdown is supported
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