@@ -50,7 +50,8 @@ public void parser(Object obj) throws IllegalAccessException, InvocationTargetEx
5050 private void loadColumnNames (Object obj ) throws IllegalAccessException , InvocationTargetException {
5151 Field [] fields = clazz .getDeclaredFields ();
5252 for (Field field : fields ) {
53- if (field .isSynthetic ()){
53+ Method method = getFieldMethod (field );
54+ if (method ==null ||field .isSynthetic ()){
5455 continue ;
5556 }
5657 Transient transientField = field .getAnnotation (Transient .class );
@@ -61,7 +62,6 @@ private void loadColumnNames(Object obj) throws IllegalAccessException, Invocati
6162 Id id = field .getAnnotation (Id .class );
6263 if (id != null ) {
6364 String idColumnName = getColumnName (field .getAnnotation (Column .class ), field );
64- Method method = getFieldMethod (field );
6565 Object idValue = getFieldValue (method , obj );
6666 String fieldName = field .getName ();
6767 idColumn = new ColumnFiled (fieldName , idColumnName , idValue , method );
@@ -70,7 +70,6 @@ private void loadColumnNames(Object obj) throws IllegalAccessException, Invocati
7070 }
7171 Column column = field .getAnnotation (Column .class );
7272 String columnName = getColumnName (column , field );
73- Method method = getFieldMethod (field );
7473 Object value = getFieldValue (method , obj );
7574 columns .add (new ColumnFiled (field .getName (), columnName , value , method ));
7675 }
0 commit comments