[ http://issues.apache.org/jira/browse/IBATIS-156?page=all ] Clinton Begin resolved IBATIS-156: ----------------------------------
Fix Version: 2.1.5 Resolution: Fixed Assign To: Clinton Begin You probably need to do one of two things: 1) explicitly specify the JDBC type in your parameter, either #myColumn,jdbcType=CHAR#, or <parameter property="myColumn,jdbcType="CHAR" /> -- OR -- 2) Just remove the jdbcType from the typeHandler definition. In the case of boolean, it's unlikely you'll have more than one definition (unless some tables use 'T' and 'F' and another table uses '1' and '0' ... in which case option #1 is better. We have unit tests to confirm this functionality works, so if we don't hear back, we'll assume it works and close the issue. > configured type handler not used in insert > ------------------------------------------ > > Key: IBATIS-156 > URL: http://issues.apache.org/jira/browse/IBATIS-156 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.1.0 > Environment: linux, java 1.5 > Reporter: Jim Newsham > Assignee: Clinton Begin > Priority: Minor > Fix For: 2.1.5 > > Custom type handlers which are configured within SqlMapConfig, such as: > <typeHandler javaType='java.lang.Boolean' jdbcType='CHAR' > callback='com...BooleanTypeHandler'/> > are working properly and automatically to convert types for queries. However > for inserts, the type conversion is not being called based on the above type > handler mapping. We have confirmed this behavior by placing debug print > statements in the methods of the type handler being used. > What does work, and what we're currently using as a workaround, is to use an > explicit, inline type handler within the insert map (such as > #private,handler=com...BooleanTypeHandler#). -- 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 - For more information on JIRA, see: http://www.atlassian.com/software/jira