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 11:56:27 GMT



apinke wrote:
> 
> Hi ,
> 
> I am using a abator generated Insert statement whose parameterClass is a
> JavaBean class.
> 
> (psuedo syntax)
>  <insert id="abatorgenerated_insert"
> parameterClass="org.test.DomainObject" >
>     insert into MYTABLE.. ..values
> (#appName:VARCHAR#,...#callTime:TIMESTAMP#)
>   </insert>
> 
> In addition to the above , I would also like to pass a schema name that
> can be appended to the table as
> "insert into $schema$.MYTABLE..."
> THe schema name will change on the fly based on various conditions and
> hence needs to be passed.
> I dont want to change the DomainObject just to add this schema as it does
> not belong there .
> 
> Is there a way I can use a parameterMap also so that I can store the
> schema in that instead ? But how do I pass this additional Map to the
> SqlMapClient insert(..) ? 
> 
> I am using Spring and the Spring SqlMapClientTemplate.
> 
> thanks
> Pat
> 

Anybody ? Any workaround or trick to do this ? Can I set some parameters
that are NOT a part of the parameterClass ?

thanks
Pat

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


Mime
View raw message