ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apinke <apinkelef...@gmail.com>
Subject Re: using a parameterClass and also passing some additional params..
Date Thu, 29 May 2008 12:17:56 GMT

Well, what do you know ? 
I thought of trying the following right after posting...and it worked ! :-)

Here is how I got it to work :
Iinstead of passing the domain object , I pass a Map that contains it.

(psuedo syntax) 
 <insert id="testinsert" parameterClass="java.util.Map" > 
    insert into $schema$.MYTABLE.. ..values
(#record.appName:VARCHAR#,...#record.callTime:TIMESTAMP#) 
  </insert> 

and now I am passing the values in the Map

Map data = new HashMap();
data.put("schema","DUMMY");
data.put("record",record);
getSqlMapClientTemplate().insert("testinsert", data);

I think it is correct and will work. Checked the src for
IsPropertyAvailableTagHandler and looks like its handled as it resolves the
"." property...

thanks
Pat
-- 
View this message in context: http://www.nabble.com/using-a-parameterClass-and-also-passing-some-additional-params..-tp17514280p17534431.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message