ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serafín Orillán Chaparro <serafin.oril...@isotrol.com>
Subject Problem populating ResultSets (CHAR type)
Date Fri, 27 Oct 2006 17:38:38 GMT

Hi there,

I'm havinga problem when executing a query because iBatis doesnt 
populate a list with the resultsets from the DB, despite there are data 
in the DB.

I've been through one one the threads that mentioned something about 
columns with CHAR type. Efectively, 2 columns from the view i'm reading 
from are CHAR types. However, i've tried the solution of adding ':CHAR' 
in the map, but IT DOES NOT work :(

Any other ideas? Here is the portion of my sql map (here, the column 
ORIGIN is CHAR(22) ):

    <resultMap class="java.util.TreeMap" id="rmap1">
       
        <result property="concept" column="CONCEPT" 
javaType="java.lang.Integer" jdbcType="NUMBER"
            
typeHandler="com.isotrol.GIW.accesoBD.dao.TypesHandlers.BigDecimalTypeHandler"/>
       
        <result property="value" column="VALUE" 
javaType="java.lang.Double" jdbcType="NUMBER" />
       
        <result property="origin" column="ORIGIN" 
javaType="java.lang.String" jdbcType="VARCHAR" />
    </resultMap>
   
    <select id="query1" parameterClass="Map" resultMap="rmap1">
        SELECT
            CONCEPT, VALUE, ORIGIN
        FROM
            V_DATA
        WHERE
            TS_DATA = to_timestamp_tz (#date#, 'DD/MM/YYYY HH24:MI:SS')
            AND PERIOD = #period#
            AND CONCEPT IN(1, 2, 3, 4)
       
        <dynamic>
            <iterate prepend="AND" property="MachineList"
                open="(" close=")" conjunction="OR"    
removeFirstPrepend="true">
                ORIGIN=#listaMaquinas[]#
            </iterate>
        </dynamic>
       
    </select>

-- 
Serafín Orillán Chaparro
Coordinador Unidad de Aplicaciones Web
Área Renovables
serafin.orillan@isotrol.com
---------------------------------------
ISOTROL
Edificio BLUENET. Avda. Isaac Newton nº 3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
www.isotrol.com



Mime
View raw message