Sure, that will work, but what is the point? That result map doesn't really buy you anything. Why not just specify a resultType in your select instead of a resultMap?

On 3/25/2010 7:43 AM, Tomáš Procházka wrote:

I found solution i have this in xml mapping file

  <resultMap type="java.lang.String" id="domainsResult">
    <result property="" column="domain"/>
  </resultMap>

<select id="selectAvailableDomains" resultMap="domainsResult">
  SELECT domain FROM queue WHERE ended IS NULL GROUP BY domain
</select>

and this in Mapper class

List<String>  selectAvailableDomains();

and it works


______________________________________________________________
Od: "Guy Rouillier"<guyr-...@burntmail.com>
Komu: user-java@ibatis.apache.org
Datum: 24.03.2010 18:10
Předmět: Re: return simple String[] or List<String>

On 3/24/2010 10:30 AM, Tomáš Procházka wrote:

It's possible return simple String[] or List<String>   with ibatis maping?

You don't mention which version of iBATIS you are using, so I'm assuming 
version 3.  This works:

        <select id="selectBundleId" resultType="string" parameterType="string">


In documentation is only 'int' 'hashmap' and collection of own class.
Itried resultType="java.util.String[]" or resultMap="java.util.String" and it 
doesn't work

The documentation says this: "Note that in the case of collections, this should be 
the type that the collection contains, not the type of the collection itself."  The 
type that the collection contains is string.

-- Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org




--
Guy Rouillier

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to