ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@kn.nrd.lt>
Subject composite keys and procedures
Date Thu, 14 Apr 2005 05:39:44 GMT
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