ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Java" <lance.j...@googlemail.com>
Subject Type handler not called when populating a map
Date Wed, 06 Aug 2008 14:47:01 GMT
I have some columns in my db that are char instead of varchar and therefore
need trimming

I have therefore declared a typehandler for string
<typeHandler javaType="java.lang.String"
callback="foo.bar.StringTypeHandler"/>

The type handler works perfectly when populating a bean property but does
not get called when I'm populating a map.

I realise that the type can not be determined for a map but the jdbc type
can be determined from the ResultSetMetaData. I was therefore hoping to do
the following:
<typeHandler jdbcType="CHAR" callback="foo.bar.StringTypeHandler"/>

But the XML parse fails stating that javaType is required.


Any suggestions?


Cheers,
Lance.

Mime
View raw message