mybatis 使用注解 一对多 嵌套结果的写法??
@Select({"select id, name, class_id from my_student"})
@Results(id="studentMap", value={
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
@Result(column="class_id ", property="classId", jdbcType=JdbcType.INTEGER)
})
List<Student> selectAll();
https://blog.csdn.net/qq_23126581/article/details/115694460?spm=1001.2014.3001.5502
我知道一共是两种方式,一种类似级联查询 https://blog.csdn.net/u013132051/article/details/78849458