The way Mike uses iBATIS requires a change to iBATIS which is currently not in the "mainstream release" (the patch is also Oracle specific).
So unless you yourself locally patched iBATIS in Mike's way that's your problem. Regards, Sven >----- Oorspronkelijk bericht ----- >Van: bob robertson [mailto:[EMAIL PROTECTED] >Verzonden: donderdag, februari 2, 2006 10:06 AM >Aan: [email protected] >Onderwerp: Re: calling stored functions > >Thanks for the help everyone, especially Mike. > > I'm trying out the approach you suggested where no TypeHandler is required. > But something is not working. My data is being inserted OK, but I'm getting > nothing back. I've tested my stored func (Oracle 9i) and this works being > called from another PLSQL prog. > > The signature is: > > CREATE OR REPLACE function myRefCursorFunction(userId in numeric) > return sys_refcursor > -- inserts a new record and returns ALL rows in the table, for testing > > Maps is, as per the example from Mike: > <resultMap id="myResultMap" class="MyClass" > > <result property="id" column="RECORD_ID" /> > <result property="name" column="NAME" /> > <result property="address" column="ADDRESS" /> > </resultMap> > > <parameterMap id="myParamMap" class="map" > > <parameter property="result" jdbcType="ORACLECURSOR" mode="OUT"/> > <parameter property="userId" jdbcType="NUMERIC" mode="IN"/> > </parameterMap> > ><procedure id="mycursorfunction" parameterMap="myParamMap" >resultMap="myResultMap" > > { ? = call myRefCursorFunction(? ) } > </procedure> > > My unit test (within Spring, ibatis 2.1.7): > > sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); > Map map = new HashMap(); > map.put("userId", "123456"); > List list = (List)sqlMap.queryForList("mycursorfunction", map); > logger.debug(list); > > > 09:16:31.032 DEBUG [TestSqlMaps]- results: [] > > > An empty array! This table is not empty, and data was inserted. Calling the > PL/SQL directly returns a non-empty cursor. My SqlMap config is 100% correct. > Honest. > > Any ideas? Or what steps do the experts normally take to debug such things. > > > >--------------------------------- >Telefonieren Sie ohne weitere Kosten mit Ihren Freunden von PC zu PC! >Jetzt Yahoo! Messenger installieren!
