HHH-18863 allow index creation to be disabled in processor

also cache enum results read from index
This commit is contained in:
Gavin King 2024-12-05 12:12:39 +01:00
parent 83110b4638
commit e4e1b59a1d
2 changed files with 5 additions and 4 deletions

View File

@ -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 ) );
}

View File

@ -134,7 +134,6 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory {
}
}
@Override
Type propertyType(String typeName, String propertyPath) {
final TypeElement type = findClassByQualifiedName(typeName);
@ -226,9 +225,11 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory {
}
if ( indexing ) {
final Set<String> indexed = getIndexedEnumTypesByValue(value);
if ( indexed != null ) {
enumTypesByValue.put(value, indexed);
return indexed;
}
}
//TODO: else do a full scan like in findEntityByUnqualifiedName()
return null;
}