ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: calling stored functions
Date Wed, 01 Feb 2006 18:13:24 GMT

The usage of "?" is AFAIK not related to the <procedure>-tag, but just
general iBATIS syntax, you can use two ways of passing parameters to

- use the parameterMap-attribute and ?'s, the order in the parametermap
is the order iBATIS uses to "populate" the ?'s
- use the parameterClass-attribute and #'s

But I could be wrong about special procedure syntax, because I don't use
them, guess I'm a spectator after all too :)


-----Original Message-----
From: Ted Schrader [mailto:tschrader@gmail.com] 
Sent: woensdag 1 februari 2006 18:33
To: user-java@ibatis.apache.org
Subject: Re: calling stored functions

Hi Mike,

I'm simply a spectator on this one, but I'm a bit puzzled about
something in your example.  You wrote:
<parameterMap id="myParamMap" class="map" >
       <parameter property="result" jdbcType="ORACLECURSOR" mode="OUT"/>
       <parameter property="userId" jdbcType="NUMERIC" mode="IN"/>

<procedure id="mycursorfunction" parameterMap="myParamMap"
resultMap="myResultMap" >
        { ? = call myRefCursorFunction(? ) }

Based on your parameter map config (and perhaps some inexperience on
my part), I'd expect your procedure to be:

<procedure id="mycursorfunction" parameterMap="myParamMap"
resultMap="myResultMap" >
        { #result# = call myRefCursorFunction(#userId#) }

Is the usage of "?", (and the curly brackets, for that matter)
specific to the <procedure> tag, or perhaps an Oracle thing?



View raw message