Hi all,

I have one mapping file for every message type I send. There is an error
handling used in every message type. So I want to put it in an seperate
mapping config:

<sqlMap namespace="Error">
        <typeAlias alias="Error" type="de.blah.database.type.ZdaError" />
        <resultMap id="ErrorMap" class="Error" >
                <result property="code" column="code" />
                <result property="message" column="message" />
        </resultMap>

        <select id="getError" parameterClass="int" resultMap="ErrorMap" >
                SELECT code, message FROM error WHERE id=#value#
        </select>
</sqlMap>


To use it I used the select with the name space :<result property="error" 
column="error" select="Error.getError"/>
And put the sqlMap resource into the sqlMapConfig.

The result is an iBatis error: Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
Error.getError in this SqlMap.

How can I reuse in sveral mapping files?

Greetings
Eric


-- 
View this message in context: 
http://www.nabble.com/include-SQL-mapping-file-tp21476828p21476828.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to