diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java index 2713aeb11e..2252cc7034 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java @@ -378,13 +378,9 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions { this.jtaTrackByThread = cfgService.getSetting( JTA_TRACK_BY_THREAD, BOOLEAN, true ); - final String hqlTranslatorImplFqn = ConfigurationHelper.extractValue( + final String hqlTranslatorImplFqn = ConfigurationHelper.extractPropertyValue( AvailableSettings.SEMANTIC_QUERY_PRODUCER, - configurationSettings, - () -> ConfigurationHelper.extractPropertyValue( - AvailableSettings.QUERY_TRANSLATOR, - configurationSettings - ) + configurationSettings ); this.hqlTranslator = resolveHqlTranslator( hqlTranslatorImplFqn, @@ -403,17 +399,9 @@ public class SessionFactoryOptionsBuilder implements SessionFactoryOptions { ); - final String sqmMutationStrategyImplName = ConfigurationHelper.extractValue( + final String sqmMutationStrategyImplName = ConfigurationHelper.extractPropertyValue( AvailableSettings.QUERY_MULTI_TABLE_MUTATION_STRATEGY, - configurationSettings, - () -> ConfigurationHelper.extractValue( - AvailableSettings.ID_TABLE_STRATEGY, - configurationSettings, - () -> ConfigurationHelper.extractPropertyValue( - AvailableSettings.HQL_BULK_ID_STRATEGY, - configurationSettings - ) - ) + configurationSettings ); this.sqmMultiTableMutationStrategy = resolveSqmMutationStrategy( diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java index 78235c1d57..b3b98391fc 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -929,39 +929,6 @@ public interface AvailableSettings { */ String CALLABLE_NAMED_PARAMS_ENABLED = "hibernate.query.proc.callable_named_params_enabled"; - /** - * Should Hibernate use enhanced entities "as a proxy"? - *
- * E.g., when an application uses {@link org.hibernate.Session#load} against an enhanced - * class, enabling this will allow Hibernate to create an "empty" instance of the enhanced - * class to act as the proxy - it contains just the identifier which is later used to - * trigger the base initialization but no other data is loaded - *
- * Not enabling this (the legacy default behavior) would cause the "base" attributes to - * be loaded. Any lazy-group attributes would not be initialized. - *
- * Applications using bytecode enhancement and switching to allowing this should be careful - * in use of the various {@link org.hibernate.Hibernate} methods such as - * {@link org.hibernate.Hibernate#isInitialized}, - * {@link org.hibernate.Hibernate#isPropertyInitialized}, etc - enabling this setting changes - * the results of those methods - * - * @implSpec See {@link org.hibernate.bytecode.enhance.spi.interceptor.EnhancementAsProxyLazinessInterceptor} - * - * @deprecated (as of 5.5) with no replacement. When using enhancement based lazy loading - * using the enhanced class as proxy is always used when appropriate. - */ - @Deprecated - String ALLOW_ENHANCEMENT_AS_PROXY = "hibernate.bytecode.allow_enhancement_as_proxy"; - - /** - * The classname of the HQL query parser factory - * - * @deprecated Use {@link #SEMANTIC_QUERY_PRODUCER} - */ - @Deprecated - String QUERY_TRANSLATOR = "hibernate.query.factory_class"; - /** * Names the {@link org.hibernate.query.hql.HqlTranslator} class to use. */ @@ -972,18 +939,6 @@ public interface AvailableSettings { */ String SEMANTIC_QUERY_TRANSLATOR = "hibernate.query.sqm.translator"; - /** - * @deprecated Use {@link #QUERY_MULTI_TABLE_MUTATION_STRATEGY} instead - */ - @Deprecated - String HQL_BULK_ID_STRATEGY = "hibernate.hql.bulk_id_strategy"; - - /** - * @deprecated Use {@link #QUERY_MULTI_TABLE_MUTATION_STRATEGY} instead - */ - @Deprecated - String ID_TABLE_STRATEGY = "hibernate.id_table_strategy"; - /** * Defines the "global" strategy to use for handling HQL and Criteria mutation queries. * diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/IdInUninitializedProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/IdInUninitializedProxyTest.java index f558a674f4..682cac757a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/IdInUninitializedProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/IdInUninitializedProxyTest.java @@ -36,12 +36,6 @@ public class IdInUninitializedProxyTest extends BaseNonConfigCoreFunctionalTestC return new Class[] { AnEntity.class }; } - @Override - protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { - super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); - } - @Test public void testIdIsAlwaysConsideredInitialized() { inTransaction( session -> { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/QueryScrollingWithInheritanceProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/QueryScrollingWithInheritanceProxyTest.java index 726ad64569..d63d1699d2 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/QueryScrollingWithInheritanceProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/QueryScrollingWithInheritanceProxyTest.java @@ -49,11 +49,6 @@ import static org.hamcrest.MatcherAssert.assertThat; */ @RunWith(BytecodeEnhancerRunner.class) public class QueryScrollingWithInheritanceProxyTest extends BaseNonConfigCoreFunctionalTestCase { - @Override - protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { - super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, "true" ); - } @Override protected void configureSessionFactoryBuilder(SessionFactoryBuilder sfb) { diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/JoinFetchedManyToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/JoinFetchedManyToOneAllowProxyTests.java index 820cea3125..275f2c8d29 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/JoinFetchedManyToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/JoinFetchedManyToOneAllowProxyTests.java @@ -61,7 +61,6 @@ public class JoinFetchedManyToOneAllowProxyTests extends BaseNonConfigCoreFuncti @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneAllowProxyTests.java index c451ed2375..20030b4fbd 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneAllowProxyTests.java @@ -59,7 +59,6 @@ public class ManyToOneAllowProxyTests extends BaseNonConfigCoreFunctionalTestCas @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneExplicitOptionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneExplicitOptionTests.java index e1eaccee80..22d190241b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneExplicitOptionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/ManyToOneExplicitOptionTests.java @@ -62,7 +62,6 @@ public class ManyToOneExplicitOptionTests extends BaseNonConfigCoreFunctionalTes @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/collectioninitializer/InitLazyToOneWithinPaddedCollectionInitializationAllowProxyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/collectioninitializer/InitLazyToOneWithinPaddedCollectionInitializationAllowProxyTest.java index fa0735d165..c02fd7abf4 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/collectioninitializer/InitLazyToOneWithinPaddedCollectionInitializationAllowProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/collectioninitializer/InitLazyToOneWithinPaddedCollectionInitializationAllowProxyTest.java @@ -56,7 +56,6 @@ public class InitLazyToOneWithinPaddedCollectionInitializationAllowProxyTest @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); ssrb.applySetting( AvailableSettings.BATCH_FETCH_STYLE, PADDED ); ssrb.applySetting( AvailableSettings.DEFAULT_BATCH_FETCH_SIZE, 10 ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneAllowProxyTests.java index d2cb4725c5..e95a5d12d8 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneAllowProxyTests.java @@ -57,7 +57,6 @@ public class InverseToOneAllowProxyTests extends BaseNonConfigCoreFunctionalTest @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneExplicitOptionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneExplicitOptionTests.java index 9b4457cf8d..e3e9d8e01b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneExplicitOptionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/InverseToOneExplicitOptionTests.java @@ -56,7 +56,6 @@ public class InverseToOneExplicitOptionTests extends BaseNonConfigCoreFunctional @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/JoinFetchedInverseToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/JoinFetchedInverseToOneAllowProxyTests.java index 2657918733..630717faf4 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/JoinFetchedInverseToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/mappedby/JoinFetchedInverseToOneAllowProxyTests.java @@ -59,7 +59,6 @@ public class JoinFetchedInverseToOneAllowProxyTests extends BaseNonConfigCoreFun @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/JoinFetchedOneToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/JoinFetchedOneToOneAllowProxyTests.java index 1726381dd4..6e60e40df6 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/JoinFetchedOneToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/JoinFetchedOneToOneAllowProxyTests.java @@ -53,7 +53,6 @@ public class JoinFetchedOneToOneAllowProxyTests extends BaseNonConfigCoreFunctio @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneAllowProxyTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneAllowProxyTests.java index 94bed26f7c..91a9b2771b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneAllowProxyTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneAllowProxyTests.java @@ -57,7 +57,6 @@ public class OneToOneAllowProxyTests extends BaseNonConfigCoreFunctionalTestCase @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneExplicitOptionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneExplicitOptionTests.java index a0dded17b4..a1ef49120c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneExplicitOptionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/onetoone/OneToOneExplicitOptionTests.java @@ -59,7 +59,6 @@ public class OneToOneExplicitOptionTests extends BaseNonConfigCoreFunctionalTest @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/JoinFetchedPolymorphicToOneTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/JoinFetchedPolymorphicToOneTests.java index 366e907605..ec4b9616e5 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/JoinFetchedPolymorphicToOneTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/JoinFetchedPolymorphicToOneTests.java @@ -124,7 +124,6 @@ public class JoinFetchedPolymorphicToOneTests extends BaseNonConfigCoreFunctiona @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneExplicitOptionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneExplicitOptionTests.java index cd2b1fd154..120c068de3 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneExplicitOptionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneExplicitOptionTests.java @@ -153,7 +153,6 @@ public class PolymorphicToOneExplicitOptionTests extends BaseNonConfigCoreFuncti @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); } diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneImplicitOptionTests.java b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneImplicitOptionTests.java index 9ab7bde0fa..9082b2556a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneImplicitOptionTests.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/mapping/lazytoone/polymorphic/PolymorphicToOneImplicitOptionTests.java @@ -125,7 +125,6 @@ public class PolymorphicToOneImplicitOptionTests extends BaseNonConfigCoreFuncti @Override protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb) { super.configureStandardServiceRegistryBuilder( ssrb ); - ssrb.applySetting( AvailableSettings.ALLOW_ENHANCEMENT_AS_PROXY, true ); sqlStatementInterceptor = new SQLStatementInterceptor( ssrb ); }