ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Davison <dar...@davisononline.org>
Subject Re: stored proc call with list items in parameter
Date Tue, 15 Apr 2008 13:04:22 GMT
we're still struggling with this, using a fairly unsatisfactory
workaround.. is there no way for iBATIS to parse such a thing?  I think
the notation I'm trying to use is standard OGNL.. not sure what iBATIS
is using.

Any pointers would be appreciated :)

Darren.


On Tue, Jan 22, 2008 at 11:38:05AM +0000, Darren Davison wrote:
> hi,
> 
> is it possible to refer to list items from a parameter class in a call
> to a stored proc?
> 
> If I have a class as follows that I use as a paramaterClass:
> 
> class Foo {
>   List<Bar> bar;
>   String name;
> 
>   // getters/setters omitted
> }
> 
> class Bar {
>   String name;
>   //getters/setters omitted
> }
> 
> 
> .. and a SP mapping as follows:
> 
> <procedure id="testSP"
> parameterClass="com.example.Foo">
> { CALL my_pkg.odd_sp_using_foo (
>   #foo.name,mode=IN#,
>   #foo.bar[0].name,mode=IN#)
> }
> </procedure>
> 
> obviously the above fails with;
> There is no READABLE property named 'bar[0]' in class
> com.example.Foo
> 
> Is there a way to make this work so that I can refer to indexed elements
> in the list of Bar instances?
> 
> Cheers,
> 
> -- 
> Darren Davison
> Public Key: 0xE855B3EA



-- 
Darren Davison
Public Key: 0xE855B3EA

Mime
View raw message