Re: Populating existing beans...

2006-09-12 Thread Diran Ayandele
ties. This makes it easy to do things like SELECT * from authors   What I'd like to do is something like SELECT * FROM $table$ From: Daniel Pitts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 12, 2006 1:42 PM To: user-java@ibatis.apache.org Subject: RE: Populating

RE: Populating existing beans...

2006-09-12 Thread Daniel Pitts
e.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 ma

RE: Populating existing beans...

2006-09-12 Thread Chris Lamey
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 id="getAuthors" resultClass="author

RE: Populating existing beans...

2006-09-12 Thread Daniel Pitts
From: Daniel Pitts [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:42 PMTo: user-java@ibatis.apache.orgSubject: RE: Populating existing beans... Thanks for the reply.  I'm well aware of queryForMap, but the problem isn't grouping the objects.   Basically, I have a bean &

RE: Populating existing beans...

2006-09-12 Thread Poitras Christian
Try using the discriminator tag in your resultMap.   Christian From: Daniel Pitts [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 September 2006 16:42To: user-java@ibatis.apache.orgSubject: RE: Populating existing beans... Thanks for the reply.  I'm well aware of queryForMap, but the pr

Re: Populating existing beans...

2006-09-12 Thread Chris Lamey
I think he's saying he wants iBATIS to populate already existing beans in a map rather than create new beans. So basically "Bean b = byId.get(beanId)" rather than "new Bean()". I guess the iBATIS call would be something like populateMap(statementName, parameterObject, key, mapWithExistingObjects)

RE: Populating existing beans...

2006-09-12 Thread Daniel Pitts
[mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 1:24 PMTo: user-java@ibatis.apache.orgSubject: Re: Populating existing beans... Daniel, there is queryForMap functionality in iBatis.  It looks like this: SqlMapExecutor.queryForMap(statementName, parameterObject, key).  The key will be a c

Re: Populating existing beans...

2006-09-12 Thread Diran Ayandele
Daniel, there is queryForMap functionality in iBatis.  It looks like this: SqlMapExecutor.queryForMap(statementName, parameterObject, key).  The key will be a column in your result map which could be your bean.id property after the result map populates the bean.  I am not sure what you mean by