Sounds like a discussion for the dev list. Consider adding it to JIRA as a wish and pass the idea by the dev list.
Cheers, Clinton On Mon, 17 Jan 2005 09:30:53 -0500, Philippe Laflamme <[EMAIL PROTECTED]> wrote: > I'm not sure adding the functionality in the DAO would be very efficient. > Maybe I'm missing your point, but consider the queryForList() method, it > would require iterating on the results to create a proxy for each item in > the List... It would be much more efficient if the proxying mechanism (or > whatever) was applied upon bean creation. > > Personally, I think that having an external bean instantiation mechanism > would make iBatis a much more flexible framework... For example, it could > help unit tests for statements (create test beans to test set and get > calls), all sorts of caching, initialisation or security processes could be > applied but most of all, statement result classes could be defined as > interfaces. To me, the last point is the most interesting... > > Would anybody else find it useful to have interfaces instead of classes when > mapping statement results? What does the iBatis dev team think? > > Thanks, > Philippe > > > -----Original Message----- > > From: Clinton Begin [mailto:[EMAIL PROTECTED] > > Sent: January 15, 2005 11:23 AM > > To: [email protected] > > Subject: Re: Bean Factory is available? > > > > > > Hi Tak, > > > > No, that's not something we support. But that sounds like > > something that would be best done by your DAO class. An > > alternative would be to put a dynamic proxy behind the > > SqlMapClient interface and proxy your classes on the way out > > of the queryForXxxxxx methods. > > > > Cheers, > > Clinton > > > > > > On Fri, 14 Jan 2005 08:08:34 -0500, > > [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > Is there a way to set bean Factory to resultMap instead of setting > > > bean class directly? I mean, > > > <resultMap id="result" class="my.model.Person"> > > > to something like > > > <resultMap id="result" class="my.PersonFactory"> > > > > > > so that I could create proxy on top of my class. > > > > > > thanks, > > > Tak > > > > > > >

