Skip to content

Commit

Permalink
Fix id type wrong due to no sorted methods from Class.getMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
qianthinking authored and Hugo Gu committed Jan 31, 2018
1 parent aa2eed6 commit 91407a8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ private void bindEntityId(Class<?> cls, String type, AccessibleObject fieldOrMet
String fieldName = getFieldName(fieldOrMethod);
Class<?> fieldType = getFieldType(fieldOrMethod);

if (idType != null && fieldType.isAssignableFrom(idType)) {
// don't override idType with super class idType
return;
}

//Add id field to type map for the entity
fieldsToTypes.put(fieldName, fieldType);

Expand Down

0 comments on commit 91407a8

Please sign in to comment.