zoukankan      html  css  js  c++  java
  • association ,collection

    mybatis 出现这个错误
    Error creating document instance.  Cause: org.xml.sax.SAXParseException; lineNumber: 24; columnNumber: 17; 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminator?)"
    原因是 association ,collection 的出现必须按照(constructor?,id*,result*,association*,collection*,discriminator?)的先后顺序
    
    
    <resultMap id="BaseResultMap" type="com.aixuexi.train.entity.Course">
    <id column="ID" property="id" jdbcType="INTEGER"/>
    <result column="SERIES_ID" property="seriesId" jdbcType="INTEGER"/>
    <result column="NAME" property="name" jdbcType="VARCHAR"/>
    <result column="STATUS" property="status" jdbcType="VARCHAR"/>
    <result column="COURSE_TYPE" property="courseType" jdbcType="VARCHAR"/>
    <result column="IMG_URL" property="imgUrl" jdbcType="VARCHAR"/>
    <result column="START_TIME" property="startTime" jdbcType="TIMESTAMP"/>
    <result column="END_TIME" property="endTime" jdbcType="TIMESTAMP"/>
    <result column="CONDITIONS" property="conditions" jdbcType="VARCHAR"/>
    <result column="SUIT" property="suit" jdbcType="VARCHAR"/>
    <result column="INTRODUCE" property="introduce" jdbcType="LONGVARCHAR"/>
    <association property="messageObject"
    column="ID"
    select="com.aixuexi.train.mapper.MessageObjectMapper.selectByPrimaryKey"/>
    <collection property="lectruers"
    ofType="com.aixuexi.train.entity.Lectruer"
    column="id"
    javaType="java.util.ArrayList"
    select="com.aixuexi.train.mapper.CourseLectruerMapper.selectByCourseId"/>
    </resultMap>
  • 相关阅读:
    2014年互联网发展趋势如何
    服务器出现阶段性错误
    用互联网思想武装自己
    杭州互联网公司汇总
    互联网牛人网址大全
    ffmpeg开发指南
    Windows下FFmpeg快速入门
    FFmpeg介绍及参数详细说明
    windows 下FFMPEG的编译方法 附2012-9-19发布的FFMPEG编译好的SDK下载
    FFMPEG视音频编解码零基础学习方法 【荐】
  • 原文地址:https://www.cnblogs.com/qianyukun/p/5418170.html
Copyright © 2011-2022 走看看