You will have to do this programatically and it is a classic n+1 problem.
I would suggest that you write a 3rd stored proc or query that returns the
people + there address.  Once that is done you can use the group by feature
of ibatis to fill the nested properties.

On Tue, Apr 7, 2009 at 4:10 PM, bpamarti <bpama...@yahoo.com> wrote:

>
> Lets say Person is a bean
>
> public class Person implements Serializable {
>  String firstName;
>  String lastName;
>  ArrayList addresses;
>
>  ... getters and setters ...
>
> }
> Address is another bean
>
> public class Address implements Serializable {
>  String city;
>  String state;
>
>  ... getters and setters ...
>
> }
> I have two stored procedures one is to getAllSelectedPersons and the other
> getAllAddressesByPerson
>
> How can we get an ArrayList of Persons using ibatis? I havent worked with
> nested ArrayLists in iBatis.
> --
> View this message in context:
> http://www.nabble.com/nested-ArrayLists-tp22939329p22939329.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Reply via email to