[ http://issues.apache.org/jira/browse/IBATIS-39?page=comments#action_57288 ] David Putnam commented on IBATIS-39: ------------------------------------
I have loaded the source into my IDE and have walked through the storage of my null value. When I am in the BasicParameterMap.setParameter method, the mapping has a jdbcType of 0 or Types.NULL, rather than a value of Types.DATE (91). Also because the DateTypeHandler does not extend CustomTypeHandler, the code explicitly calls ps.setNull. It passes the jdbcType of 0 because it also does not match the JdbcTypeRegistry.UNKNOWN (-99999999) value. It did not appear that any of the mapping objects had jdbcType or TypeName values, and it may be only the null attributes that care. Here are the values of the mapping variable inside the setParameter method. mapping: com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMapping = [EMAIL PROTECTED] propertyName: java.lang.String = "deceasedDate" typeHandler: com.ibatis.sqlmap.engine.type.TypeHandler = [EMAIL PROTECTED] jdbcType: int = 0 jdbcTypeName: java.lang.String = null nullValue: java.lang.String = null mode: java.lang.String = "IN" inputAllowed: boolean = true outputAllowed: boolean = false javaType: java.lang.Class = null errorString: java.lang.String = "Check the parameter mapping for the 'deceasedDate' property." The object is being passed by parameterClass not parameterMap in the statement stanza of the sqlMap resource. Hope this helps. David > Unable to store null attributes as null values in a column > ---------------------------------------------------------- > > Key: IBATIS-39 > URL: http://issues.apache.org/jira/browse/IBATIS-39 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.0.8 > Environment: Standalone (no appserver) application in Java 1.4.2 connecting > to Sybase 12.5 using Sybase JDBC2 drivers (jconn2.jar) > Reporter: David Putnam > Priority: Blocker > Attachments: Customer.ibatis.xml, Customer.java, ibatis.xml, program log.txt > > Any null attribute throws a SQL Exception with an Unsupported JDBC type 0 > message. When I get back to the office I will copy actual error message and > configuration information into here. > BTW I created this because I am not sure if there is a better forum for this. > Hopefully I am not cluttering this area with a simple configuration problem. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira