ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Davison <dar...@davisononline.org>
Subject stored proc call with list items in parameter
Date Tue, 22 Jan 2008 11:38:05 GMT
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

Mime
View raw message