diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/HibernateProcessor.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/HibernateProcessor.java index 57770f1c31..1dd4c9cf75 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/HibernateProcessor.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/HibernateProcessor.java @@ -291,7 +291,7 @@ public class HibernateProcessor extends AbstractProcessor { context.setInclude( options.getOrDefault( INCLUDE, "*" ) ); context.setExclude( options.getOrDefault( EXCLUDE, "" ) ); - context.setIndexing( parseBoolean( options.get( INDEX ) ) ); + context.setIndexing( parseBoolean( options.getOrDefault( INDEX, "true" ) ) ); return parseBoolean( options.get( FULLY_ANNOTATION_CONFIGURED_OPTION ) ); } diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/ProcessorSessionFactory.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/ProcessorSessionFactory.java index 2b9afc1c5e..381b1ba924 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/ProcessorSessionFactory.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/validation/ProcessorSessionFactory.java @@ -134,7 +134,6 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory { } } - @Override Type propertyType(String typeName, String propertyPath) { final TypeElement type = findClassByQualifiedName(typeName); @@ -226,8 +225,10 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory { } if ( indexing ) { final Set indexed = getIndexedEnumTypesByValue(value); - enumTypesByValue.put(value, indexed); - return indexed; + if ( indexed != null ) { + enumTypesByValue.put(value, indexed); + return indexed; + } } //TODO: else do a full scan like in findEntityByUnqualifiedName() return null;