Hi,

I have a problem related to Multiple Complex Parameters Properties.

Here is the ResultMap:

<resultMap id="ATIResultMap" class="ATIClass">
                        <...>
                        <result property="mandataria" 
column="codCli=COD_CLIENTE_MAND,
codCompCli=COD_COMPAGNIA, codTipoUvCli=COD_TIPO_UV, codUvCli=COD_UV,
dataRicercaCli=DATA_RICERCA" select="getDenominazioneCliente" nullValue=""
/>
</resultMap>

Here is the invoked subQuery:

<statement id="getDenominazioneCliente" 
resultMap="DenominazioneClienteMap">
                SELECT  COD_CLIENTE, DESC_CLIENTE, COD_TIPO_CLI 
                FROM V_CLIENTE
                WHERE   COD_CLIENTE             = #codCli#
                        AND COD_COMPAGNIA       = #codCompCli#
                        AND COD_TIPO_UV         = #codTipoUvCli#
                        AND COD_UV                      = #codUvCli#
                        AND DTA_INIZIO_VAL      <![CDATA[ <= ]]> 
#dataRicercaCli#
                        AND DTA_FINE_VAL        <![CDATA[ > ]]> #dataRicercaCli#
                        AND DTA_CANC_LOGICA IS NULL
</statement>

When column COD_CLIENTE_MAND is NULL, we got this error message:

it.fondsai.jeffs.core.exception.service.arch.JeffsServiceDBException:
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state
[null]; error code [-99999]; 
     --- The error occurred in
it/fondsai/odg/entity/anagrafica/ATI.ibatis.xml. 
     --- The error occurred while applying a result map. 
     --- Check the it.fondsai.odg.entity.anagrafica.ATI.ATIResultMap. 
     --- Check the result mapping for the 'mandataria' property. 

Otherwise it works fine.
The point is: how can we tell iBatis to avoid invoking subQuery when a
column is NULL?

Thank you in advance,
Andrea


-- 
View this message in context: 
http://www.nabble.com/Null-pointer-with-Multiple-Complex-Parameters-Properties-tf2410495.html#a6718878
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to