We're updating the issue view to help you get more done. 

String mapped ENUMs can't be loaded from CHARs only VARCHARS (fix is trivial)

Description

An enum persisted as a string to a CHAR column comes back with extra spaces appended, so then fails the Enum.valueOf() lookup.

Fix is easy:

Line 132 of EnumType.java, method nullSafeGet, change:

return Enum.valueOf( enumClass, name );
to
return Enum.valueOf( enumClass, name.trim() );

Which should be perfectly logical, because spaces are illegal in enum names anyways.

Environment

all

Status

Assignee

Brett Meyer

Reporter

Pierce Wetter

Time Tracking

10m

Components

Fix versions

Affects versions

3.5.0-Beta-3

Priority

Major