zoukankan      html  css  js  c++  java
  • mybatis之-----------------resultmap的使用

        <resultMap id="myMap" type="com.student.demo.domain.Student">
            <id property="id1" column="id"/>
            <result property="names" column="name"/>
            <result property="grades" column="grade"/>
            <collection property="list" ofType="com.student.demo.domain.StudentDetail">
                <id property="id" column="id2"/>
                <result property="address" column="address"/>
                <result property="student_id" column="student_id"/>
                <result property="fathers_name" column="fathers_name"/>
                <result property="mathers_name" column="mathers_name"/>
                <result property="phone_number" column="phone_number"/>
            </collection>
        </resultMap>
    
        <select id="selectAll" resultMap="myMap">
        SELECT
        s.id,
        s.name,
        s.grade,
        sd.id id2,
        sd.address,
        sd.student_id,
        sd.fathers_name,
        sd.mathers_name,
        sd.phone_number
    FROM
        student s,students_detail sd where s.id=sd.student_id
    </select>

     

     文件下载在->

    文件中包括数据库结构,下载地址在【文件中】student压缩包

     

     

  • 相关阅读:
    [转] Spring的session管理
    C# 屏幕截图
    C#数字图像处理图像旋转图片加角度
    C#委托
    C# HttpWebRequest 添加Cookie验证
    网站
    前端获取URL中的值
    从下往上画的文字
    测试SSL的网站
    Tomcat-绑定证书的两种方法
  • 原文地址:https://www.cnblogs.com/St123456/p/13717896.html
Copyright © 2011-2022 走看看