public void setUsu_areas(ArrayList usu_areas)...

Use List instead of ArrayList.


On Wed, May 7, 2008 at 4:27 AM, Bruno Sanz <> 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" />

Where "listaAreas" call another "select" in the ibatis

<select id="listaAreas"  parameterClass="long" resultMap="AreasBean">

Thank you

2008/5/7 Leucht, Axel <>:

What do you mean by saying "It crashes" ?
If there is an excetion, please post it here.