• Post Reply Bookmark Topic Watch Topic
  • New Topic

ibatis and List javabean properties  RSS feed

doug parker
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my sqlmapping, the parameterClass attribute in my statement element is a javabean which has a java.util.List as a property.

in the ibatis sql maps doc it seems like i can access it the normal way but it is not working for me. Here is what their doc says:

Throughout this document you may have seen objects accessed through a special syntax that might be
familiar to anyone who has used Struts or any other JavaBeans compatible framework. The Data Mapper
framework allows object graphs to be navigated via JavaBeans properties, Maps (key/value) and Lists.
Consider the following navigation (includes a List, a Map and a JavaBean):

Employee emp = getSomeEmployeeFromSomewhere();
((Address) ( (Map)emp.getDepartmentList().get(3) ).get (�address�)).getCity();
This property of the employee object could be navigated in an SqlMapClient property (ResultMap,
ParameterMap etc�) as follows (given the employee object as above):

i try cities[0] and i bombs on server startup.
[ April 24, 2006: Message edited by: doug parker ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!