十二、通过Auto-Mapping 实现多表查询

十二、通过Auto-Mapping 实现多表查询

 

 

 1 <?xml version="1.0" encoding="UTF-8" ?>
 2 <!DOCTYPE mapper
 3         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 4         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 5 <mapper namespace="com.mapper.StudentMapper">
 6     <cache/>
 7 
 8     <select id="selAll" resultType="Student">
 9         select s.id, s.name, s.age, s.gender, s.cid, c.id `clazz.id`, c.name `clazz.name`, c.room `clazz.room`
10         from t_student s
11         left join t_class c
12         on s.cid=c.id
13     </select>
14 </mapper>

 

十二、通过Auto-Mapping 实现多表查询

上一篇:移动端各种分辨率手机屏幕----适配方法集锦


下一篇:multipart/form-data和application/x-www-form-urlencoded的区别(二)urlencoded之自动deocde