Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPJLambdaWrapper @TableField(value = "中文")会不能映射到字段上 #140

Closed
gzlq123456 opened this issue May 21, 2024 · 0 comments
Closed

Comments

@gzlq123456
Copy link

当前使用版本(必填,否则不予处理)

mybatis-plus-join-boot-starter1.4.12

该问题是如何引起的?(确定最新版也有问题再提!!!)

表里有一个中文命名的字段,使用@TableField(value = "地市") private String city; 使用MPJLambdaWrapper查询后city并没有数据,可以查询,但是city没值。我又使用LambdaQueryWrapper,发现LambdaQueryWrapper可以映射出正确的值。

重现步骤(如果有就写完整)

实体ZdOrg
@TableField(value = "地市")
private String city;

MPJLambdaWrapper query = new MPJLambdaWrapper<>();
query.select(ZdOrg::getCountyNoSuffix).orderByAsc(ZdOrg::getCountyId);
List data = zdOrgDao.selectList(query);

报错信息

TableField填的是中文时,实体字段不能正确映射值,虽然可以查询。LambdaQueryWrapper可以正确映射。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant