ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: One query populating *multiple* lists per object returned
Date Mon, 15 May 2006 16:17:15 GMT
iBATIS will only create the list implementations if they are null
originally.  So in your example, if you create the list implementations in
the constructor of the Person object, iBATIS will use them as is.

Jeff Butler

On 5/14/06, MCCORMICK, Paul <Paul.McCORMICK@doir.wa.gov.au> wrote:
> >>Thanks Jeff for your comments. Makes perfect sense. I forgot about
> using a custom List Implementation approach. >>That would work out
> nicely.
> How would you inject your custom list implementation?  Is thought ibatis
> created the list implementation and did not provide the ability to
> override it.
> For example, if the Person was defined like below would ibatis create a
> MyListImp object instead of its own List implementation?
> Person Object
> -------------
> MyListImp cats;
> MyListImp dogs;
> int personID;
> String personName;

View raw message