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
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 populating existing beans, but I hope this > helps. > > Diran > > Daniel Pitts wrote: > > I have a > > Map byId; > > Which

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
populating existing beans, but I hope this helps. Diran Daniel Pitts wrote: I have a Map byId; Which was built by "byId.put(myBean.getId(), myBean);" MyBean is the base class, there are many types of "MyBean" objects. Is there a away to tell iBATIS to use the bean in &quo

Populating existing beans...

2006-09-12 Thread Daniel Pitts
I have a Map byId; Which was built by "byId.put(myBean.getId(), myBean);" MyBean is the base class, there are many types of "MyBean" objects. Is there a away to tell iBATIS to use the bean in "byId" map as the result object? Or do I have to get the result, and copy the values over myself? I know