mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#443 - ENH: Enum mapping - Add annotation @DbEnumValue that can be used to on a enum method which provides DB values
This commit is contained in:
1 parent
fc0b47342b
commit
b326724139
10 files changed
+247
-20
No files matched your search
@@ -111,8 +111,8 @@ public class DeployUtil {
|
||||
}
|
||||
ScalarType<?> scalarType = typeManager.getScalarType(enumType);
|
||||
if (scalarType == null) {
|
||||
// see if it has a Mapping in avaje.properties
|
||||
scalarType = typeManager.createEnumScalarType(enumType);
|
||||
// look for @DbEnumValue or @EnumValue annotations etc
|
||||
scalarType = typeManager.createEnumScalarType((Class<? extends Enum<?>>)enumType);
|
||||
if (scalarType == null) {
|
||||
// use JPA normal Enum type (without mapping)
|
||||
EnumType type = enumerated != null ? enumerated.value() : null;
|
||||
|
||||
Reference in new issue
Block a user