ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: child lists with resultmap
Date Wed, 07 May 2008 14:09:44 GMT
public void setUsu_areas(ArrayList usu_areas)...


Use List instead of ArrayList.

Clinton


On Wed, May 7, 2008 at 4:27 AM, Bruno Sanz <brunosanzmarino@gmail.com>
wrote:

> The error code is
>
> --- The error occurred in /recursos/Usuarios.xml.
> --- The error occurred while applying a result map.
> --- Check the Usuario.oUsuario.
> --- The error happened while setting a property on the result object.
> --- Cause: java.lang.RuntimeException: Error setting property
> 'setUsu_areas' of 'es.ineco.aena.procbcn.beans.UsuarioBean@127077b'.
> Cause: java.lang.IllegalArgumentException: argument type mismatch
>
>
> Where the "bean" setUsu_areas method get one ArrayList as parameter
>
> public void setUsu_areas(ArrayList usu_areas) {
>             this.usu_areas = usu_areas;
>     }
>
> In the "theory", ibatis generate one "List" with the collection of the
> child "select" ┬┐true?
>  I have one "result" in my resultMap father wich have one "select"
> argument
>
>
> <resultMap id="oUsuario" class="es.ineco.aena.procbcn.beans.UsuarioBean"
> groupBy="id">
>
> <result property="usu_nombre" column="USU_NOMBRE"/>
> <result property="usu_areas" column="USU_ID" select = "listaAreas" />
> </resultMap>
>
>
> Where "listaAreas" call another "select" in the ibatis
>
>
> <select id="listaAreas"  parameterClass="long" resultMap="AreasBean">
> ...
> </select>
>
>
> Thank you
>
>
> 2008/5/7 Leucht, Axel <Axel.Leucht@prodv.de>:
>
> >  What do you mean by saying "It crashes" ?
> >
> > If there is an excetion, please post it here.
> >
> > /Axel
> >
>
>

Mime
View raw message