I could (and in fact that is what I have been doing) But, it's a pity to do the same work that iBATIS does already when it knows the class beforehand.
-----Original Message----- From: Chris Lamey [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 2:22 PM To: user-java@ibatis.apache.org Subject: RE: Populating existing beans... On Tue, 2006-09-12 at 13:49 -0700, Daniel Pitts wrote: > To clarify more, > I have a bunch of beans of different classes. There is a table for > each class of bean, with columns that correspond directly to bean > properties. This makes it easy to do things like <select > id="getAuthors" resultClass="author">SELECT * from authors</select> > > What I'd like to do is something like > <select id="getSomething" resultClass="$resultClass$" > remapResults="true">SELECT * FROM $table$</select> Could you use a map as a resultClass and based on what you pass in as $table$, populate your bean? Cheers, Chris