diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java index 437affa4ef351..5cb67fbc21182 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmProcessor.java @@ -734,7 +734,7 @@ public void build(HibernateOrmRecorder recorder, HibernateOrmConfig hibernateOrm .scope(Singleton.class) .unremovable() .supplier(recorder.jpaConfigSupportSupplier( - new JPAConfigSupport(persistenceUnitNames, entityPersistenceUnitMapping))) + new JPAConfigSupport(persistenceUnitNames))) .done()); } diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfig.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfig.java index 1b5fa1d0d75ae..705d5ec3c0465 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfig.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfig.java @@ -1,7 +1,6 @@ package io.quarkus.hibernate.orm.runtime; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -26,13 +25,10 @@ public class JPAConfig { private static final Logger LOGGER = Logger.getLogger(JPAConfig.class.getName()); - private final Map> entityPersistenceUnitMapping; - private final Map persistenceUnits; @Inject public JPAConfig(JPAConfigSupport jpaConfigSupport) { - this.entityPersistenceUnitMapping = Collections.unmodifiableMap(jpaConfigSupport.entityPersistenceUnitMapping); Map persistenceUnitsBuilder = new HashMap<>(); for (String persistenceUnitName : jpaConfigSupport.persistenceUnitNames) { @@ -101,13 +97,6 @@ public Set getPersistenceUnits() { return persistenceUnits.keySet(); } - /** - * Returns the set of persistence units an entity is attached to. - */ - public Set getPersistenceUnitsForEntity(String entityClass) { - return entityPersistenceUnitMapping.getOrDefault(entityClass, Collections.emptySet()); - } - /** * Need to shutdown all instances of Hibernate ORM before the actual destroy event, * as it might need to use the datasources during shutdown. diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfigSupport.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfigSupport.java index b0a04a21a1f46..453ddc7c58052 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfigSupport.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/JPAConfigSupport.java @@ -1,19 +1,15 @@ package io.quarkus.hibernate.orm.runtime; -import java.util.Map; import java.util.Set; public class JPAConfigSupport { public Set persistenceUnitNames; - public Map> entityPersistenceUnitMapping; public JPAConfigSupport() { } - public JPAConfigSupport(Set persistenceUnitNames, - Map> entityPersistenceUnitMapping) { + public JPAConfigSupport(Set persistenceUnitNames) { this.persistenceUnitNames = persistenceUnitNames; - this.entityPersistenceUnitMapping = entityPersistenceUnitMapping; } }