ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Butler <jeffgbut...@gmail.com>
Subject Re: question about iBATOR and TINYINT columns
Date Fri, 13 Feb 2009 16:08:46 GMT
The JDBC spec states that TINYINT should be mapped to either byte or
short - so the "default" is a bit ambiguous.  Ibator maps TINYINT to
byte which is correct on some databases.  You can override this either
with a <columnOverride>, or with a custom JavaTypeResolver (as you've

Ibator in Eclipse can only find your custom JavaTypeResolver if you
use the integrated Ant task - you will have to to create a small Ant
build file (as shown in the documentation), then alter the launch
configuration for the Ant build to add your custom class to the

Jeff Butler

On Fri, Feb 13, 2009 at 4:38 AM, Gilles Schlienger <s_gilou@yahoo.com> wrote:
> Hi all,
> I think iBATOR is really great and this time I'm using the automatic java
> fields creation from my database columns from the Eclipse plugin.
> I'm using MySQL and I have the following problem:
> - all my TINYINT columns are mapped to Byte java fields (I would prefer
> Integer or Short)
> Looking at the code, the class JavaTypeResolverDefaultImpl really specifies
> that TINYINT should be mapped to Byte fields, it's not a default beahaviour.
> I have 2 questions:
> - Why are TINYINT columns mapped to Byte java fields ?
> - I wrote a class that extends JavaTypeResolverDefaultImpl to override the
> TINYINT case, but when I run the plugin, it says that it cannot instantiate
> my class. Do I have to do anything special so that the iBATOR plugin find my
> class ?
> Thanks a lot in advance
> Regards
> Gilles
> ________________________________
> Ne pleurez pas si votre Webmail ferme. Récupérez votre historique sur Yahoo!
> Mail

View raw message