Skip to content

Commit 113e9a8

Browse files
ydqabel533
authored andcommitted
修复 jpa 模块 获取 Entity 类型错误的问题
1 parent 62ad39f commit 113e9a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jpa/src/main/java/io/mybatis/provider/jpa/JpaEntityClassFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class JpaEntityClassFinder extends GenericEntityClassFinder {
3030
@Override
3131
public boolean isEntityClass(Class<?> clazz) {
3232
//带注解或不是简单类型和枚举的都算实体
33-
return clazz.isAnnotationPresent(Table.class) || (!SimpleTypeUtil.isSimpleType(clazz) && !clazz.isEnum());
33+
return clazz.isAnnotationPresent(Table.class) || (!clazz.isPrimitive() && !SimpleTypeUtil.isSimpleType(clazz) && !clazz.isEnum());
3434
}
3535

3636
@Override

0 commit comments

Comments
 (0)