collection 一对多 缺少数据
原因是 property="empList" 是 pojo Dept属性中的List<Employ> empList
不是Employee类
<collection property="empList"
ofType="org.example.pojo.Employee" >
<resultMap id="deptAndEmp" type="dept">
<id property="deptId" column="dept_id"></id>
<result property="deptName" column="dept_name"></result>
<collection property="empList"
ofType="org.example.pojo.Employee" >
<id column="id" property="id"></id>
<result column="last_name" property="lastName"></result>
<result column="email" property="email"></result>
<result column="salary" property="salary"></result>
</collection>
</resultMap>