HHH-18863 allow index creation to be disabled in processor
also cache enum results read from index
This commit is contained in:
parent
83110b4638
commit
e4e1b59a1d
|
@ -291,7 +291,7 @@ public class HibernateProcessor extends AbstractProcessor {
|
||||||
context.setInclude( options.getOrDefault( INCLUDE, "*" ) );
|
context.setInclude( options.getOrDefault( INCLUDE, "*" ) );
|
||||||
context.setExclude( options.getOrDefault( EXCLUDE, "" ) );
|
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 ) );
|
return parseBoolean( options.get( FULLY_ANNOTATION_CONFIGURED_OPTION ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,6 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
Type propertyType(String typeName, String propertyPath) {
|
Type propertyType(String typeName, String propertyPath) {
|
||||||
final TypeElement type = findClassByQualifiedName(typeName);
|
final TypeElement type = findClassByQualifiedName(typeName);
|
||||||
|
@ -226,8 +225,10 @@ public abstract class ProcessorSessionFactory extends MockSessionFactory {
|
||||||
}
|
}
|
||||||
if ( indexing ) {
|
if ( indexing ) {
|
||||||
final Set<String> indexed = getIndexedEnumTypesByValue(value);
|
final Set<String> indexed = getIndexedEnumTypesByValue(value);
|
||||||
enumTypesByValue.put(value, indexed);
|
if ( indexed != null ) {
|
||||||
return indexed;
|
enumTypesByValue.put(value, indexed);
|
||||||
|
return indexed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//TODO: else do a full scan like in findEntityByUnqualifiedName()
|
//TODO: else do a full scan like in findEntityByUnqualifiedName()
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue