HHH-17460 - Ongoing JPA 32 work

This commit is contained in:
Steve Ebersole 2024-04-04 16:41:12 -05:00
parent 8fe3d9e6aa
commit 1104b8a9b8
3 changed files with 12 additions and 6 deletions

View File

@ -15,8 +15,11 @@ dependencies {
implementation jakartaLibs.jaxbApi
implementation jakartaLibs.jaxb
implementation libs.hibernateModels
implementation libs.jandex
implementation libs.hcann
implementation "org.hibernate.common:hibernate-commons-annotations:6.0.6.Final"
compileOnly libs.ant

View File

@ -108,7 +108,7 @@ public class EnversMetadataBuildingContextImpl implements EnversMetadataBuilding
@Override
public ReflectionManager getReflectionManager() {
return metadataCollector.getBootstrapContext().getReflectionManager();
return configuration.getReflectionManager();
}
@Override

View File

@ -12,6 +12,7 @@ import java.util.Properties;
import java.util.concurrent.Callable;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.annotations.common.reflection.java.JavaReflectionManager;
import org.hibernate.boot.registry.classloading.spi.ClassLoadingException;
import org.hibernate.boot.registry.selector.spi.StrategySelector;
import org.hibernate.boot.spi.MetadataImplementor;
@ -74,6 +75,7 @@ public class Configuration {
private final boolean globalLegacyRelationTargetNotFound;
private final boolean trackEntitiesChanged;
private final JavaReflectionManager reflectionManager;
private boolean trackEntitiesOverride;
private final String auditTablePrefix;
@ -185,13 +187,14 @@ public class Configuration {
// todo: there are places that need bits built from the revinfo entity configuration
// this exists here as a way to pass it down in an immutable way to any consumer of this class
final ReflectionManager reflectionManager =
metadata.getMetadataBuildingOptions().getTypeConfiguration()
.getMetadataBuildingContext().getBootstrapContext()
.getReflectionManager();
this.reflectionManager = new JavaReflectionManager();
this.revisionInfo = new RevisionInfoConfiguration( this, metadata, reflectionManager );
}
public JavaReflectionManager getReflectionManager() {
return reflectionManager;
}
public boolean isGenerateRevisionsForCollections() {
return generateRevisionsForCollections;
}