ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: composite keys and procedures
Date Sun, 17 Apr 2005 07:00:34 GMT
It doesn't look like you're even making use of a composite key (at least not 
a composite key that gets passed to your proc).

The following only sends a single column to the loadCategories proc.

<result property="rightsCategories" column="ID" select="loadCategories"/>


So...I suppose this should work fine. As for the Oracle ref cursor stuff, I 
can't speak to that.

Cheers,
Clinton


On 4/13/05, ala@kn.nrd.lt <ala@kn.nrd.lt> wrote:
> 
>  Hello
> 
>  I'm trying to load list property into root object but always getting 
> list==null. List property is loaded through stored procedure. I modified 
> ibatis to support Oracle cursors as been described earlier in this mailing 
> list. Does Ibatis supports composite keys for <procedure> tag, not only 
> <statement>? Below is mapping xml, problematic resultset is rRole property 
> rightsCategories which is trying to loadCategories.
> 
>  <sqlMap>
> 
> <resultMap id="rRole" class="com.nrd.nk.logic.security.Role">
> 
> <result property="id" column="ID"/>
> 
> <result property="code" column="ROLE_CODE"/>
> 
> <result property="name" column="ROLE_NAME"/>
> 
> <result property="superOrgUse" column="SUPER_ORG_USE"/>
> 
> <result property="rightsCategories" column="ID" select="loadCategories"/>
> 
> </resultMap>
> 
> <resultMap id="rCategory" class="com.nrd.nk.logic.security.Category">
> 
> <result property="code" column="CODE"/>
> 
> <result property="name" column="MEANING"/>
> 
> </resultMap>
> 
> <parameterMap id="pRolesList" class="com.nrd.utils.PagingInfo">
> 
> <parameter property="result" jdbcType="ORACLECURSOR"
> 
> javaType="java.lang.Object" mode="OUT"/>
> 
> <parameter property="totalRecordCount" jdbcType="NUMERIC"
> 
> javaType="java.lang.Long" mode="OUT"/>
> 
> <parameter property="startRecord" jdbcType="NUMERIC"
> 
> javaType="java.lang.Long" mode="INOUT"/>
> 
> <parameter property="pageRecordCount" jdbcType="NUMERIC"
> 
> javaType="java.lang.Integer" mode="IN"/>
> 
> </parameterMap>
> 
> <parameterMap id="pRole" class="com.nrd.nk.logic.security.Role">
> 
> <parameter property="id" mode="INOUT" jdbcType="NUMERIC"
> 
> javaType="java.lang.Long"/>
> 
> <parameter property="code" mode="INOUT" jdbcType="VARCHAR"
> 
> javaType="java.lang.String"/>
> 
> <parameter property="name" mode="INOUT" jdbcType="VARCHAR"
> 
> javaType="java.lang.String"/>
> 
> <parameter property="superOrgUse" mode="INOUT" jdbcType="NUMERIC"
> 
> javaType="java.lang.Integer"/>
> 
> </parameterMap>
> 
> <parameterMap id="pRoleId" class="java.lang.Long">
> 
> <parameter property="id" mode="IN" jdbcType="NUMERIC"
> 
> javaType="java.lang.Long"/>
> 
> </parameterMap>
> 
> <parameterMap id="pCursor" class="com.nrd.utils.CursorParameter">
> 
> <parameter property="result" jdbcType="ORACLECURSOR"
> 
> javaType="java.lang.Object" mode="OUT"/>
> 
> </parameterMap>
> 
> <procedure id="loadRolesList" resultMap="rRole" parameterMap="pRolesList">
> 
> {?=call sys_users_br.ld_roles_lst(?,?,?)}
> 
> </procedure>
> 
> <procedure id="saveRole" parameterMap="pRole" resultMap="rRole">
> 
> {call sys_users_br.sv_roles(?,?,?,?)}
> 
> </procedure>
> 
> <procedure id="loadRole" parameterMap="pRole">
> 
> {call sys_users_br.ld_roles(?,?,?,?)}
> 
> </procedure>
> 
> <procedure id="deleteRole" parameterMap="pRoleId">
> 
> {call sys_users_br.s_roles_state(?,'DELETED')}
> 
> </procedure>
> 
> <procedure id="loadCategories" resultMap="rCategory" 
> parameterMap="pCursor">
> 
> {call sys_classifiers_br.ld_classifier_children(?,'RIGHT_CATH')}
> 
> </procedure>
> 
> </sqlMap>
> 
>

Mime
View raw message