摘要: 按结果嵌套处理 <!--第一种查询方法:按结果嵌套处理--> <select id="getTeacher" resultMap="TeacherStudent"> select s.id sid, s.name sname, t.name tname, t.id tid from mybatis. 阅读全文
posted @ 2021-07-08 16:32 withLevi 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 按照查询嵌套处理 <!--思路: 1. 查询所有的学生信息 2. 根据查询出来的学生的tid 寻找对应的老师 子查询 --> <select id="getAllStudents" resultMap="StudentMap"> select * from mybatis.student; </se 阅读全文
posted @ 2021-07-08 13:29 withLevi 阅读(70) 评论(0) 推荐(0) 编辑