You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Meindert <me...@pastelebusiness.com> on 2006/03/09 15:32:35 UTC

nullValue

Hi there,

I'm trying to use the NULL replacement while using a map that hasn't got the
required parameter;

I'm making a service that inserts data based on a XML Document
- I won't add the XML element to my input XML If a field value is NULL 
- I put my XML elements straight into a map, 
=>the null values are therefore missing in the map.

In the example below I try to insert a map that has #Code# and #CompanyId#
but no key->value for #IsDischarged#
I want to insert false or 0 if this is the case; so I use;
insert into EmplMain (Code, IsDischarged, CompanyId) 
    values (#Code#, #IsDischarged:BOOLEAN:0#, #CompanyId#)

But this doesn't work;       
DEBUG: insert into EmplMain (Code, IsDischarged, CompanyId) values (?, ?, ?)

DEBUG Parameters: [001, null, 4]
DEBUG Types: [java.lang.String, null, java.lang.Integer]


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.1/277 - Release Date: 08/03/2006