Commit f4cd3842 authored by Quxl's avatar Quxl

x

parent 532b380d
...@@ -45,23 +45,25 @@ public class Desc { ...@@ -45,23 +45,25 @@ public class Desc {
if(!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) { if(!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) {
String fieldName = field.getName(); String fieldName = field.getName();
String columnName = null; String columnName = null;
if(field.isAnnotationPresent(Column.class)) { if(!field.isAnnotationPresent(Transient.class)) {
Column column = field.getAnnotation(Column.class); if(field.isAnnotationPresent(Column.class)) {
String columnAnnoName = column.name(); Column column = field.getAnnotation(Column.class);
if(StringUtil.isNotBlank(columnAnnoName)) { String columnAnnoName = column.name();
columnName = columnAnnoName; if(StringUtil.isNotBlank(columnAnnoName)) {
columnName = columnAnnoName;
} else {
columnName = fieldName;
}
} else { } else {
columnName = fieldName; columnName = fieldName;
} }
} else { if(field.isAnnotationPresent(Id.class)) {
columnName = fieldName; pk_field_names.add(fieldName);
} pk_column_names.add(columnName);
if(field.isAnnotationPresent(Id.class)) { }
pk_field_names.add(fieldName); all_field_names.add(fieldName);
pk_column_names.add(columnName); all_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