ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandeep Mirchandani" <skmi...@staff.cellmania.com>
Subject Mapping Stored Functions
Date Mon, 29 Nov 2004 23:26:18 GMT

I have the following stored function that I wish to call.
Note, it returns a value and also has a side effect of updating
the database.

{ #rets# = call a.foo( #id# ) }

How do I map such a statement using sqlmap.  Also I have a
ParameterMap class defined which defines the two parameter properties.

The following works, if there is no side effect as mentioned above.
         select a.foo(#value#)
         from dual

How can I use the following to get the string. Assuming that MyParams
is defined to provide the necessary maps for rets and id.

  <procedure id="getMyString" parameterMap="MyParams"
        resultClass="java.lang.String" cacheModel="MyCache" >
      { #rets# = call a.foo( #id# ) }

Thanks in advance.

-- skm

View raw message