ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaybytez <jayby...@gmail.com>
Subject selectKey not working - #value# is repeating id.
Date Tue, 20 Jun 2006 17:31:25 GMT

I have the following insert into a codes lookup table:

  <insert id="insertBatchFacilityServiceLookup"
    <selectKey resultClass="int" >
    	SELECT foo_lookup_seq.nextval AS id 
    	FROM dual
 		INSERT INTO foo_lookup ( foo_code, foo_desc ) 
 		VALUES (#id#, #value#) 

I am sending a String into this insert and the String represents the
foo_desc.  But when I run this query and debug into the iBatis code...the
parameters for this query show ("This is the description", "This is the
description") instead of the (code, desc) like (10000, "This is the
description").  I assume the usage of #id# outputs the response from the
selectKey, but I think that the #value# is also outputting the response from
the selectKey and not the String from the parameterClass.  Anyway to get
around this?


jay blanton
View this message in context: http://www.nabble.com/selectKey-not-working----value--is-repeating-id.-t1819062.html#a4959670
Sent from the iBATIS - User - Java forum at Nabble.com.

View raw message