ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Härtel, Eric <E.Haer...@d-trust.net>
Subject Insert null
Date Wed, 31 Oct 2007 14:14:31 GMT
Hello list,

I want to insert null for a String/VARCHAR property. Posting http://www.mail-archive.com/user-java@ibatis.apache.org/msg05079.html
tells if my String is null default is null is inserted in the table. But it works not this
way here. 
I got the following error message:
--- The error occurred while applying a parameter map.  
--- Check the insertApplication-InlineParameterMap.  
--- Check the parameter mapping for the 'email' property.  
--- Cause: java.lang.NullPointerException

The insert mapping:
<insert id="insertApplication" parameterClass="de.dtrust.tk.ebxml.database.Application">
	INSERT INTO application ( degree, firstname, name_prefix, name_affix, lastname, 
			address_1, address_2, address_3, address_4, email) 
	VALUES ( #degree#, #firstname#, #namePrefix#, #nameAffix#, #lastname#, 
			#address_1#, #address_2#, #address_3#, #address_4#, #email# )
</insert>

If I put an empty String("") for the email it works. But with null would be more comfortable.
Any suggestions?

Gretings Eric

Mime
View raw message