ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin McLeod <mister.mccl...@gmail.com>
Subject [No Subject]
Date Mon, 13 Apr 2009 23:49:54 GMT
I have the following:

<insert id="insert" parameterClass="domain.Thing">
   insert into thing (thing_id, animal, mineral, vegetable)
   values (

When iBatis executes the above an exception is thrown:

--- The error occurred in ibatis/business.xml.
--- The error occurred while applying a parameter map.
--- Check the Business.insert-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Column 'animal' cannot be null
       at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
       at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:393)

My understanding here is that if the JavaBean property returns a null
value that it is substituted for the value specified in the
parameterMap. The Exception tends to discount this interpretation.

What am I missing?

Thanks in advance

View raw message