1. 学生表 (id,name,teacherid) 和老师表 (id,name)
select id,name,teachername from stu,teacher where stu.teacherid=teacher.id;
注意:Pojo 要包含无参构造函数,很重要
ResultMap association collection javaType ofType select
association
1. 学生表 (id,name,teacherid) 和老师表 (id,name)
select id,name,teachername from stu,teacher where stu.teacherid=teacher.id;
注意:Pojo 要包含无参构造函数,很重要
ResultMap association collection javaType ofType select
association