HHH-4699 trim value from database before Enum.valueOf()
this change fixes the problem with fixed size columns with enum values that are right padded.
This commit is contained in:
parent
e66b5ab79d
commit
334f8b0fa3
|
@ -455,7 +455,10 @@ public class EnumType implements EnhancedUserType, DynamicParameterizedType,Logg
|
|||
|
||||
private Enum fromName(String name) {
|
||||
try {
|
||||
return Enum.valueOf( enumClass, name );
|
||||
if(name == null) {
|
||||
return null;
|
||||
}
|
||||
return Enum.valueOf( enumClass, name.trim() );
|
||||
}
|
||||
catch ( IllegalArgumentException iae ) {
|
||||
throw new IllegalArgumentException(
|
||||
|
|
Loading…
Reference in New Issue