问题复现
<resultMap id="BaseResultMap" type="com.xxx.Student">
<id column="student_id", jdbcType="BIGINT" property="studentId">
<result column="student_name", jdbcType="VARCHAR" property="studentName">
</resultMap>
<select id="query" resultMap="BaseResultMap">
select
student_id as studentId,
student_name as studentName
from student where deleted = 0
</select>
@Data
public class Student {
private Long studentId;
private String studentName;
}
pom版本
老项目 mybatis: 3.4.1
查询出的column:studentid、studentname,查询正常映射到Student
新项目 mybatis: 3.5.7
查询出的column:studentid、studentname,查询映射到Student,属性均为空
问题代码定位:
高版本jar包
低版本无问题jar包
Comment From: harawata
Hello @sayhi-captain ,
Please create a small demo project like these with assertions.