懂ibatis的大俠幫小弟看看錯在哪了

wuhaohao發表於2007-01-21
<<?xml version="1.0" encoding="UTF-8"?>>

<<!DOCTYPE sqlMap
PUBLIC "-//iBatis.com//DTD SQL Map 2.0//EN"
"http://www.iBatis.com/dtd/sql-map-2.dtd">>

<<sqlMap namespace="User">>
<<typeAlias alias="user" type="src.User"/>>
<<typeAlias alias="piaojia" type="src.Piaojia"/>>

<<resultMap id="user-piaojia" class="src.User">>
<<result property="hbh" column="hbh"/>>
<<result property="qfcs" column="qfcs"/>>
<<result property="mdcs" column="mdcs"/>>
<<result property="qfsj" column="qfsj"/>>
<<result property="ddsj" column="ddsj"/>>
<<result property="hkgs" column="hkgs"/>>
<<result property="piaojias" column="hbh" select="getPiaoJia"/>>
<</resultMap>>

<<select id="getUser"
parameterClass="java.lang.String"
resultMap="user-piaojia">>
<<![CDATA[select * from fjhb where hbh=hbh# ]]>>
<</select>>

<<select id="getPiaoJia"
parameterClass="java.lang.String"
resultMap="get-result">>
<<![CDATA[select * from piaojia where hbh=value# ]]>>
<</select>>

<<resultMap id="User.get-result" class="src.Piaojia">>
<<result property="id" column="id"/>>
<<result property="hbh" column="hbh"/>>
<<result property="piaojia" column="piaojia"/>>
<<result property="jijie" column="jijie"/>>
<</resultMap>>

<</sqlMap>>
請教大俠, 我這個對映檔案到底應怎樣修改呀,編輯器提示:There is no result map named User.get-result in this SqlMap.

相關文章