懂ibatis的大侠帮小弟看看错在哪了

07-01-21 wuhaohao

<<?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.

flyinghuang
2007-01-22 14:23

你的映射文件都没有把内容帖上来啊