ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe David Manana" <fdman...@ieee.org>
Subject Re: select multiple fields query
Date Mon, 21 Apr 2008 14:43:40 GMT
Thanks, it works nice :)
I notice the Map's keys are always strings in uppercase. Is it possible to
control the case?

cheers

On Mon, Apr 21, 2008 at 3:59 PM, Larry Meadors <larry.meadors@gmail.com>
wrote:

> You can't currently get a list of lists, but you can get a list of maps:
>
> <select id="getClusterNames" resultClass="hashmap">
>
> Larry
>
>
> On Mon, Apr 21, 2008 at 7:21 AM, Filipe David Manana <fdmanana@ieee.org>
> wrote:
> > Hi,
> >
> > I am a beginner regarding iBATIS (Java version). I want to map a select
> > query that returns rows of 2 fields. My sql map is:
> >
> >   <select id="getClusterNames" resultClass="String">
> >      SELECT DISTINCT clustername, clustertype
> >     FROM vwhost
> >   </select>
> >
> > Using this mapping I get a List of Strings, but only values for the
> > clustername field.
> > I would like to get, for example, a List of Lists (each inner list would
> > have exactly 2 strings).
> >  Using "List" as the resultClass I get a List of empty Lists :(
> > How can I get the 2 columns?
> >
> > cheers
> >
> > --
> > Filipe David Manana,
> > fdmanana@ieee.org
> >
> >  "The cruellest lies are often told in silence."
>



-- 
Filipe David Manana,
fdmanana@ieee.org

"The cruellest lies are often told in silence."

Mime
View raw message