mybatis 改进之处
在ibatis中,resultMap不能是BaseResultMap,由于本查询涉及到TEACHER表并从中查到T.NAME,这个NAME值不是Student对象中的属性。所以就得有一个含有teacherName别名的并继承于BaseResultMap的ResultMap,如:studentResultMap
当然com.jvortex.domain.Student中必需要有teacherName的Getter,Setter方法。
mybatis中则不需要再重新写一个studentResultMap的子ResultMap,但Getter,Setter方法还是需要的。