You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Dorin Manoli <Do...@dataireland.ie> on 2007/01/19 12:26:03 UTC
statement from another mapped file
Hi guys, how can I call a mapped statement from another mapped file.
I want to do like here :
<resultMap id="select-category-result" class="Category">
<result property="Id" column="CAT_ID"/>
<result property="Description" column="CAT_DESCRIPTION"/>
<result property="ProductList" column="CAT_ID" select="selectProductsByCatId"/>
</resultMap>
<resultMap id="select-product-result" class="Product">
<result property="Id" column="PRD_ID"/>
<result property="Description" column="PRD_DESCRIPTION"/>
</resultMap>
<resultMaps>
<statements>
<!-- This statement executes 1 time -->
<statement id="selectCategory" parameterClass="int" resultMap="select-category-result">
select * from CATEGORY where CAT_ID = #value#
</statement>
Exept that selectProductsByCatId statement will be in another file.
At the moment I got an exception