mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
fix: getter 方法转属性名错误。
This commit is contained in:
parent
7602cb950b
commit
357e91db58
@ -19,7 +19,6 @@ import com.mybatisflex.core.exception.FlexExceptions;
|
||||
import com.mybatisflex.core.query.QueryColumn;
|
||||
import com.mybatisflex.core.table.TableInfo;
|
||||
import com.mybatisflex.core.table.TableInfoFactory;
|
||||
import org.apache.ibatis.reflection.property.PropertyNamer;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.invoke.SerializedLambda;
|
||||
@ -38,7 +37,7 @@ public class LambdaUtil {
|
||||
public static <T> String getFieldName(LambdaGetter<T> getter) {
|
||||
SerializedLambda lambda = getSerializedLambda(getter);
|
||||
String methodName = lambda.getImplMethodName();
|
||||
return PropertyNamer.methodToProperty(methodName);
|
||||
return StringUtil.methodToProperty(methodName);
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +63,7 @@ public class LambdaUtil {
|
||||
String methodName = lambda.getImplMethodName();
|
||||
Class<?> entityClass = getImplClass(lambda, classLoader);
|
||||
TableInfo tableInfo = TableInfoFactory.ofEntityClass(entityClass);
|
||||
return tableInfo.getQueryColumnByProperty(PropertyNamer.methodToProperty(methodName));
|
||||
return tableInfo.getQueryColumnByProperty(StringUtil.methodToProperty(methodName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user