ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C.Ze...@ads.it
Subject parameters for resultMap and other XML conf statements
Date Mon, 02 Oct 2006 15:30:05 GMT

Hi all
There are some explanations about how to "parametrize" the SQL instructions
contained by the XML config files
(cf. parameters and inline paramenters , pag. 16-17 of
iBATIS-SqlMaps-2.pdf)

We have a resultMap defined as follows

      <resultMap id="mapChiave"
class="it.finmatica.gpj.aa.frontebd.ChiaveBean">
            <result property="id" column="TIPO_DATO_ID"/>
      </resultMap>

the column (actually the name of a record type attribute) to be extracted
should be, in turn
   once TIPO_DATO_ID
   then VOCE_ID
   then FORMULA_ID
   ...

In this case we have not to parametrize a SQL statement but, instead, the
resultMap definition that should appear as

      <resultMap id="mapChiave"
class="it.finmatica.gpj.aa.frontebd.ChiaveBean">
            <result property="id" column="VOCE_ID"/>
      </resultMap>
      ...

and so on.

How is it possible to achieve the parametrization of the resultMap?A
Am I doing the right thing?

Thanks in advance for any help


ciao
Cesare
Mime
View raw message