zoukankan      html  css  js  c++  java
  • 178-链接查询association

    <resultMap id="BaseResultMap" type="com.bjpowernode.fastdfs.model.CreditorInfo">
        <id column="id" jdbcType="INTEGER" property="id" />
        <result column="real_name" jdbcType="VARCHAR" property="realName" />
        <result column="id_card" jdbcType="VARCHAR" property="idCard" />
        <result column="address" jdbcType="VARCHAR" property="address" />
        <result column="sex" jdbcType="INTEGER" property="sex" />
        <result column="phone" jdbcType="VARCHAR" property="phone" />
        <result column="money" jdbcType="DECIMAL" property="money" />
        <!--给我们返回的实体类添加一个引用属性对象,而且将数据库表的字段值分别放到相对应属性的值,如将grpup_name的值放到groupName属性上->
        <association property="creditorFile" javaType="com.bjpowernode.fastdfs.model.CreditorFile">
          <id column="cfid" property="id"></id>
          <result column="group_name" property="groupName"></result>
          <result column="remote_file" property="remoteFile"></result>
          <result column="file_size" property="fileSize"></result>
          <result column="old_filename" property="oldFilename"></result>
          <result column="ci_id" property="ciId"></result>
        </association>
      </resultMap>
  • 相关阅读:
    Bzoj 1036: [ZJOI2008]树的统计Count
    cogs 1176. [郑州101中学] 月考
    cogs 610. 数对的个数
    Codevs 1247 排排站
    洛谷P1962 斐波那契数列
    Codevs 1051 接龙游戏
    2012 Noip提高组 Day2
    2012 Noip提高组 Day1
    poj1061 青蛙的约会
    一些常用的模板
  • 原文地址:https://www.cnblogs.com/pogusanqian/p/12903671.html
Copyright © 2011-2022 走看看