mybatis 多层映射

<resultMap extends="studentMap" id="studentMapWithFile"
type="com.education.model.vo.StudentVo">
    <!--
studentFileMapWithOther
是下一个resultmap的id-->
<association property="studentFileVo" resultMap="studentFileMapWithOther"/>
</resultMap>
<resultMap id="studentFileMapWithOther" type="com.education.model.vo.StudentFileVo">
<result property="id" column="student_file_id"/>
<result property="orgId" column="student_file_org_id"/>
<result property="classId" column="class_id"/>
<result property="studentId" column="student_id"/>
<result property="status" column="status"/>
<result property="createdTime" column="student_file_created_time"/>
<association property="studentEntityModel" javaType="com.education.model.StudentEntityModel">
<result property="id" column="student_entity_id"/>
<result property="studentFileId" column="student_file_id"/>
<result property="studentName" column="student_name"/>
<result property="studentNum" column="student_num"/>
<result property="sex" column="sex"/>
<result property="age" column="age"/>
<result property="birthday" column="birthday"/>
<result property="nation" column="nation"/>
<result property="familyTypeId" column="family_type_id"/>
<result property="province" column="province"/>
<result property="city" column="city"/>
<result property="district" column="district"/>
<result property="address" column="address"/>
<result property="qq" column="qq"/>
<result property="wechat" column="wechat"/>
<result property="email" column="email"/>
<result property="recruitType" column="recruit_type"/>
<result property="politicalStatus" column="political_status"/>
<result property="joinYoungTime" column="join_young_time"/>
<result property="recommendPeople" column="recommend_people"/>
<result property="armyStatus" column="army_status"/>
<result property="familyBackground" column="family_background"/>
<result property="isFarmer" column="is_farmer"/>
<result property="isOnlyChild" column="is_only_child"/>
<result property="isBasicLiving" column="is_basic_living"/>
</association>
</resultMap>
上一篇:php函数分割


下一篇:vo类,model类,dto类的作用及划分