ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: Error using caches ("There is no statement named...")
Date Tue, 27 Jun 2006 12:56:02 GMT
Does the "modificacion" exist somewhere in your sqlmap-file? You excluded some parts by replacing
it with "<...>", so I cannot verify that.

Second, the commented select uses a resultClass while the uncommented select uses a resultMap,
but I don't think that matters in this case.

Niels

-----Original Message-----
From: Serafín Orillán Chaparro [mailto:serafin.orillan@isotrol.com] 
Sent: dinsdag 27 juni 2006 13:41
To: user-java@ibatis.apache.org
Subject: Re: Error using caches ("There is no statement named...")

Sure!

Here you have my Operadores.xml map file. The problem arises when i 
discomment out the cacheModel declaration, no matter if i use it in the 
select statement or not.

<sqlMap namespace="operadores">
   
    <typeAlias alias="Map" type="java.util.Map" />
   
    <!--
    <cacheModel id="cacheConsulta" type="LRU">
        <flushInterval minutes="30" />
        <flushOnExecute statement="alta"/>
        <flushOnExecute statement="baja"/>
        <flushOnExecute statement="modificacion"/>
        <property name="size" value="100" />
    </cacheModel>
    -->
   
    <resultMap class="java.util.HashMap" id="resultadoOperador">
        <result property="telefono" column="TELEFONO" 
javaType="java.lang.String" jdbcType="VARCHAR"/>
        <result property="nombre" column="NOMBRE" 
javaType="java.lang.String" jdbcType="VARCHAR"/>
        <result property="habilitado" column="HABILITADO" 
javaType="boolean" jdbcType="INTEGER"
            
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoBoolean"/>
        <result property="periodo_recepcion" column="DIAS_SEMANA" 
javaType="int" jdbcType="VARCHAR"
            
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoPeriodoRecepcion"

/>
        <result property="perfil" column="ID_PERFIL" javaType="int" 
jdbcType="INTEGER"/>
        <result property="id_parque" column="ID_PARQUE" 
javaType="java.lang.String" jdbcType="VARCHAR"/>
        <result property="horario_recepcion_desde" column="HORA_INI" 
javaType="java.lang.String" jdbcType="VARCHAR"/>
        <result property="horario_recepcion_hasta" column="HORA_FIN" 
javaType="java.lang.String" jdbcType="VARCHAR"/>
        <result property="envio_automatico" column="ENVIO_AUTO" 
javaType="java.lang.String" jdbcType="VARCHAR"
            
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoBoolean"/>
        <result property="horario_envio_automatico" 
column="HORARIO_ENVIO_AUTO" javaType="java.lang.String" jdbcType="VARCHAR"/>

    </resultMap>
   
   
    <select id="consulta" resultMap="resultadoOperador">
    <!-- <select id="consulta" parameterClass="Map" 
resultClass="java.util.HashMap" cacheModel="cacheConsulta"> -->
        SELECT
            TELEFONO, NOMBRE, HABILITADO,
            DIAS_SEMANA,
            ID_PERFIL,
            ID_PARQUE,
            HORA_INI, HORA_FIN,
            ENVIO_AUTO, HORARIO_ENVIO_AUTO
        FROM
            GSM_V_OPERADORES

    </select>

    <...>
</sqlMap>


Mime
View raw message