--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/5fcb5935-4cc4-41c3-9f03-4b8a14fe3000n%40googlegroups.com.
--
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/2af13a74-f84a-4868-b369-4f5a63d9c2cbn%40googlegroups.com.
I've some new discoveries through debug,I can get the out parameter in MainTransDO.result,but why not ResultDO.result ?
Although they have the same properties, v_result is set to the variable mainTransDo instead of ResultDo. Why?
<select id="lockMainTx" statementType="CALLABLE" parameterType="MainTransDO" resultType="ResultDO">
DECLARE
p_tx_id varchar2(128) := NULL;
p_sys_tx_id varchar2(128) := NULL;
v_status varchar2(8) := NULL ;
v_tx_id varchar2(128) := NULL;
v_gmt_create timestamp(6) := NULL;
v_result varchar2(256) := 'SUCCESS';
BEGIN
p_tx_id := #{txId, mode=IN};
P_sys_tx_id := #{systemTransactionId, mode=IN};
BEGIN
SELECT TX_ID, STATUS, GMT_CREATE INTO v_tx_id, v_status,v_gmt_create FROM MAIN_TRANSACTION
WHERE TX_ID = p_tx_id AND SYSTEM_TRANSACTION_ID = p_sys_tx_id FOR UPDATE WAIT 3;
EXCEPTION
WHEN OTHERS THEN
v_result := 'LOCK_ERROR: '||SUBSTR(SQLERRM , 1 , 200);
END;
-- var result is set to MainTransDO instead of ResultDO
#{result, mode=OUT, jdbcType=VARCHAR} := v_result;
END;
</select>
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/e0000a17-74b7-49ee-89f8-3b1a7ac9838bn%40googlegroups.com.