ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaybytez <jayby...@gmail.com>
Subject Re: selectKey and parameterMap issue
Date Thu, 17 Aug 2006 15:03:36 GMT

And if I put it into the id (from selectKey) into my parameterMap like the
following, it does not push the result of the selectKey query into the
insert statement:

    <parameterMap id="hbaContactParameters"
class="com.healthnet.hnfs.hba.to.ContactTO">  
        <parameter property="id" jdbcType="NUMERIC"/>        
        <parameter property="tscName" jdbcType="VARCHAR"/>
        <parameter property="contactName" jdbcType="VARCHAR"/>
        <parameter property="contactDate" jdbcType="DATE"
javaType="dateTime"/>
        <parameter property="issueResolvedIndicator" jdbcType="NUMERIC"/>
        <parameter property="followUpRequiredIndicator" jdbcType="NUMERIC"/>
        <parameter property="followUpRequiredDescription"
jdbcType="VARCHAR"/>
        <parameter property="contactTypeDescription" jdbcType="VARCHAR"/>
        <parameter property="contactReasonTypeDescription"
jdbcType="VARCHAR"/>
        <parameter property="contactType" jdbcType="NUMERIC"
javaType="com.foo.to.ContactType"/>
        <parameter property="contactMethodType" jdbcType="NUMERIC"
javaType="com.foo.to.ContactMethodType"/>
        <parameter property="contactReasonType" jdbcType="NUMERIC"
javaType="com.foo.to.ContactReasonType"/>
    </parameterMap>
    
    <insert id="insertHBAContact"
        parameterMap="hbaContactParameters">
        <selectKey resultClass="long" keyProperty="id">
            <![CDATA[
                SELECT hba_contact_seq.NEXTVAL FROM DUAL
            ]]>
        </selectKey>
        
        <![CDATA[    
            INSERT INTO hba_contact_hbc 
                ( hbc_contact_id, hbc_tsc_name, hbc_contact_name,
hbc_contact_date,
                  hbc_issue_resolved_ind, hbc_follow_up_required_ind, 
                  hbc_follow_up_required_desc, hbc_contact_type_desc, 
                  hbc_reason_desc, hbc_fk_contact_type_id,
hbc_fk_contact_method_id,
                  hbc_fk_contact_reason_id ) 
            VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
        ]]>
    </insert>
-- 
View this message in context: http://www.nabble.com/selectKey-and-parameterMap-issue-tf2118776.html#a5852938
Sent from the iBATIS - User - Java forum at Nabble.com.


Mime
View raw message