mybatis 使用注解 一对多 嵌套结果的写法??
2条回答 默认 最新
关注@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
解决评论 打赏 举报无用 1