Skip to content

Commit

Permalink
Improve error message for ebean-orm#3031
Browse files Browse the repository at this point in the history
  • Loading branch information
rbygrave committed May 9, 2023
1 parent 646f8cc commit e6bf46e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public ScalarType<?> enumType(Class<? extends Enum<?>> enumType, EnumType type)
ScalarTypeEnum<?> scalarEnum = (ScalarTypeEnum<?>) scalarType;
if (scalarEnum != null && !scalarEnum.isOverrideBy(type)) {
if (type != null && !scalarEnum.isCompatible(type)) {
throw new IllegalStateException("Error mapping Enum type:" + enumType + " It is mapped using 2 different modes when only one is supported (ORDINAL, STRING or an Ebean mapping)");
throw new IllegalStateException("Error mapping Enum type:" + enumType + " It is mapped using 2 of (ORDINAL, STRING or an Ebean mapping) when only one is supported.");
}
return scalarEnum;
}
Expand Down

0 comments on commit e6bf46e

Please sign in to comment.