By default iBATIS expects enums to be stored in the DB using the enum _names_.
I am working with a legacy DB where the enum's ordinal is stored instead.

On a global level I managed to do this by patching the default EnumTypeHandler.

The only alternative that I currently see is to write a specific type handler
for each single enum used in the project. This can't really be the ultimate
solution.

Is there a better solution that I have missed so far?
I can't register a typehandler for the "Enum" base class, because iBATIS only 
ever
compares to the concrete class.

Shouldn't there be a built-in, quick way to configure either ordinal or name
on a mapper level?

Reply via email to