`
hua04104
  • 浏览: 244897 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Cause: No type handler could be found to map the property 'reporter' to the colu

阅读更多
在做根据ID查询一个带有外键的主表类时,如果在映射文件方法里返回结果使用相应类,则会报此种错误:Cause: com.ibatis.sqlmap.client.SqlMapException: No type handler could be found to map the property 'reporter' to the column 'reporter'.  One or both of the types, or the combination of types is not supported.

解决办法:使用resultMap。


错误代码:
<select id="selectPetitonLetterById" parameterClass="int" resultClass="PetitionLetter">
  	select * from t_petitionletter where id = #id#
  </select>


正确代码:
<resultMap id="PetitionLetterResult" class="PetitionLetter">
    <result property="id" column="id"/>
    <result property="identifier" column="identifier"/>
    <result property="reporter" column="reporter" select="selectReporter"/>
    <result property="letterInformation" column="letterInformation" select="selectLetterInformation"/>
    <result property="supervision" column="supervision" select="selectSupervision"/>
    <result property="processFlow" column="processFlow" select="selectProcessFlow"/>
  </resultMap>

<select id="selectPetitonLetterById" parameterClass="int" resultMap="PetitionLetterResult">
select * from t_petitionletter where id = #id#
  </select>
分享到:
评论

相关推荐

    netty-handler-4.1.65.Final-API文档-中英对照版.zip

    Maven坐标:io.netty:netty-handler:4.1.65.Final; 标签:netty、handler、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    netty-handler-4.1.68.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.68.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.65.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.65.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.73.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.73.Final; 标签:handler、netty、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.74.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.74.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.24.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.24.Final; 标签:handler、netty、jar包、java、API文档、中文版; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档...

    netty-handler-proxy-4.1.68.Final-API文档-中文版.zip

    赠送jar包:netty-handler-proxy-4.1.68.Final.jar; 赠送原API文档:netty-handler-proxy-4.1.68.Final-javadoc.jar; 赠送源代码:netty-handler-proxy-4.1.68.Final-sources.jar; 赠送Maven依赖信息文件:netty-...

    ubuntu vps安装docker报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题解决

    主要介绍了解决ubuntu vps安装docker时报错:Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题的相关资料,文中介绍非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。

    netty-handler-proxy-4.1.73.Final-API文档-中文版 (1).zip

    赠送jar包:netty-handler-proxy-4.1.73.Final.jar; 赠送原API文档:netty-handler-proxy-4.1.73.Final-javadoc.jar; 赠送源代码:netty-handler-proxy-4.1.73.Final-sources.jar; 赠送Maven依赖信息文件:netty-...

    netty-handler-4.1.23.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.23.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.27.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.27.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.16.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.16.Final; 标签:netty、handler、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - ADD: The property TFlexPanel.GridControl moved to the public section and is now available for writing (during the writing, the standard grid object TFlexGrid is released, and a user's one is set)....

    netty-handler-proxy-4.1.73.Final-API文档-中英对照版.zip

    赠送jar包:netty-handler-proxy-4.1.73.Final.jar; 赠送原API文档:netty-handler-proxy-4.1.73.Final-javadoc.jar; 赠送源代码:netty-handler-proxy-4.1.73.Final-sources.jar; 赠送Maven依赖信息文件:netty-...

    netty-handler-4.1.23.Final-API文档-中英对照版.zip

    Maven坐标:io.netty:netty-handler:4.1.23.Final; 标签:netty、handler、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    netty-handler-4.1.27.Final-API文档-中英对照版.zip

    Maven坐标:io.netty:netty-handler:4.1.27.Final; 标签:netty、handler、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    netty-handler-4.1.16.Final-API文档-中英对照版.zip

    Maven坐标:io.netty:netty-handler:4.1.16.Final; 标签:netty、handler、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    netty-handler-4.1.11.Final-API文档-中文版.zip

    Maven坐标:io.netty:netty-handler:4.1.11.Final; 标签:handler、netty、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    netty-handler-4.1.74.Final-API文档-中英对照版.zip

    Maven坐标:io.netty:netty-handler:4.1.74.Final; 标签:netty、handler、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中...

    netty-handler-proxy-4.1.74.Final-API文档-中文版.zip

    赠送jar包:netty-handler-proxy-4.1.74.Final.jar; 赠送原API文档:netty-handler-proxy-4.1.74.Final-javadoc.jar; 赠送源代码:netty-handler-proxy-4.1.74.Final-sources.jar; 赠送Maven依赖信息文件:netty-...

Global site tag (gtag.js) - Google Analytics