ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Maves" <nathan.ma...@gmail.com>
Subject Re: TypeHandler question
Date Sat, 31 Mar 2007 21:29:22 GMT
Again I ask that you post your result map.

I have an idea but I want to make sure first.

Nathan


On 3/31/07, Mikael Andersson <mail.micke@gmail.com> wrote:
>
> The typehandlers work fine when explicitly specifying then on the result
> element, but I thought that they would be used automatically if the types
> matched.
>
> On 30/03/07, Nathan Maves <nathan.maves@gmail.com> wrote:
> >
> > Can you post the result map of where you specify to use this type
> > handler.
> >
> > Nathan
> >
> >
> > On 3/29/07, Mikael Andersson < mail.micke@gmail.com> wrote:
> > >
> > > Hi,
> > > I wonder how typehandlers are resolved.
> > >
> > > Currently I am defining a couple of typehandlers in the main config
> > > file, and for some reason they aren't applied to matching results?
> > >
> > > Typehandler registration:
> > >     <typeHandler javaType="boolean"
> > >                  jdbcType="CHAR"
> > >                  callback="
> > > com.test.ibatis.typehandler.YesNoBooleanTypehandlerCallback"/>
> > >     <typeHandler javaType="boolean"
> > >                  jdbcType="VARCHAR"
> > >                  callback="
> > > com.test.ibatis.typehandler.YesNoBooleanTypehandlerCallback"/>
> > >
> > > Not sure I needed to define it twice, but did it just in case.
> > >
> > > Previously with simple resultMaps they type handler seems to have been
> > > applied without problems.
> > > The result map it currently doesn't work for is using the
> > > discriminator tag, not sure if that can be the reason?
> > >
> > > Also in my experience for simple mappings were the result map isn't
> > > needed (plain <select>) the type handler isn't applied, is this correct?
> > >
> > > Cheers,
> > >  Mike
> > >
> > >
> >
>

Mime
View raw message