Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionuse
CurrentTimestamp
insteaduse annotation members of JPA association mapping annotations, for example,OneToMany.targetEntity()
Just implementSessionEventListener
directly.No longer usedNo longer has any effect.with no replacement.Use settings,TypeContributor
,FunctionContributor
orAdditionalMappingContributor
instead depending on needno longer calledwith no replacement.with no replacement.Will be removed without replacement. See HHH-15641Will be removed without replacement. See HHH-15641Register aBytecodeProvider
through Java services.UseBytecodeProvider.getReflectionOptimizer(Class, Map)
inssteadWill be removed, Hibernate ORM will use the BytecodeProvider implementation it finds on the classpath loading it via the standard ServiceLoader mechanism. Currently, there is only a single implementation which is included in Hibernate ORM, so it's not possible to override this. See HHH-17643Will be removed without replacement. See HHH-15641Will be removed without replacement. See HHH-15641This setting is now ignored. Enable the log categoryorg.hibernate.session.metrics
to automatically collect and log session-level metrics.useDialect.getCheckCondition(String, Long[])
insteadUse Dialect.getNativeValueGenerationStrategy() insteadMoved toDialect
Moved toDialect
in favor ofSize(Integer, Integer, Long)
in favor ofSize(Integer, Integer, Long)
No longer usedNo longer usedbecauseCascadeType.LOCK
is deprecatedUse anExpectation
classOnly used in one place, will be removedSubclasses should now directly inheritPostInsertIdentifierGenerator
andBulkInsertionCapableIdentifierGenerator
, or even better, simply implementOnExecutionGenerator
directly.replaced byAssigned
This remains around as an implementation detail ofhbm.xml
mappings.since it overrides a deprecated methodThis is not an elegant way to do anythingUseGeneratedValuesMutationDelegate
instead.no longer set, useJdbcEnvironment.getIdentifierHelper()
use the default constructor insteaduseStandardStack(Object)
instead.No longer usedNo longer usedNo longer usedNo longer usedUse discovery instead.Consider using discovery instead to dynamically locate contributors.sincePersistenceUnitTransactionType
will be removed in JPA 4Consider using discovery instead to dynamically locate contributors.No longer called, except from tests. UseKeyValue.createGenerator(Dialect, RootClass, Property, GeneratorSettings)
UseDiscriminable.getDiscriminatorMapping()
instead.No longer usedHigly inefficient - do not use; this exists to support other deprecated methods and will be removed.Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here (generally),PluralAttributeMapping
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getElementDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getIdentifierDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getIndexDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getKeyDescriptor()
The functionality of DiscriminatorMetadata,DiscriminatorType
andMetaType
have been consolidated intoEntityDiscriminatorMapping
andDiscriminatorConverter
The functionality of DiscriminatorType,DiscriminatorMetadata
andMetaType
have been consolidated intoEntityDiscriminatorMapping
andDiscriminatorConverter
No longer calledNo longer used in ORM coreuseEntityMutationTarget.getInsertDelegate()
insteadNo longer used.org.hibernate.query.criteria.HibernateCriteriaBuilder.arrayContainsAllNullable(Expression<T[]>, T[]) org.hibernate.query.criteria.HibernateCriteriaBuilder.arrayContainsAllNullable(T[], Expression<T[]>) This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Subquery, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Subquery, org.hibernate.query.common.JoinType, boolean)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Class, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(EntityDomainType, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(JpaCteCriteria, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.joinLateral(Subquery, org.hibernate.query.common.JoinType)
No longer calledUseQueryParameterBindings.empty()
instead.this constructor does not carry information about the query which caused the failureThis enum still has exactly one member, and was placed in a package from which it has no usages. It will be removed or moved.UseSqmPathSource.findSubPathSource(String, boolean)
insteadUse #SqmPathSource.getSubPathSource(String, boolean)
insteadwas previously used for HQL. UseSqmUpdateStatement(NodeBuilder)
insteadwas previously used for Criteria. UseSqmUpdateStatement(Class, SqmCriteriaNodeBuilder)
instead.UseSessionBuilder.tenantIdentifier(Object)
insteadNo longer calledWill be removed. Use the other methods to visit each operation.Will be removed. Use the other methods to visit each operation.in favor ofScrollableResultsConsumer.instance()
UseStatelessSessionBuilder.tenantIdentifier(Object)
insteadUse JUnit 5 along with one of the Hibernate ORM's class-level test annotations (BaseUnitTest
,SessionFactory
,Jpa
,SessionFactoryFunctionalTesting
,ServiceRegistryFunctionalTesting
, ...) andAfterAll
. Alternatively to the Hibernate ORM test annotations, you can use@TestInstance(TestInstance.Lifecycle.PER_CLASS)
directly on your test.Use JUnit 5 along with one of the Hibernate ORM's class-level test annotations (BaseUnitTest
,SessionFactory
,Jpa
,SessionFactoryFunctionalTesting
,ServiceRegistryFunctionalTesting
, ...) andBeforeAll
. Alternatively to the Hibernate ORM test annotations, you can use@TestInstance(TestInstance.Lifecycle.PER_CLASS)
directly on your test.Use JUnit 5 andFailureExpected
instead.No replacement with JUnit 5 at the moment.No replacement with JUnit 5 at the moment.By definition, something "not yet implemented" is something we are actively seeking to removeUse JUnit 5 andRequiresDialect
instead.Use JUnit 5 andRequiresDialectFeature
instead.Use JUnit 5 andRequiresDialects
instead.Use JUnit 5 andDisabledOnOs
orDisabledIf
.Use JUnit 5 andSkipForDialect
instead.Use JUnit 5 andSkipForDialectGroup
instead.No direct replacement.No direct replacement.Replaced byAttributeMapping
No direct replacement, though seeAttributeMapping
andAttributeMetadata
No direct replacementNo direct replacementNo direct replacementNo direct replacementNo direct replacementReplaced byEntityMappingType
. EntityMetamodel was a first attempt at what has becomeEntityMappingType
Replaced byEntityVersionMapping
Replaced byEventType
as id-generation has been redefined using the new broader generation approach. For 7.0, this is kept around to supporthbm.xml
mappings and will be removed in 8.0 once we finally drophbm.xml
support.No direct replacement; seeEntityIdentifierMapping
No direct replacement; seeEntityIdentifierMapping
No direct replacementNo direct replacementReplaced byAttributeMapping
in favor ofImmutability.instance()
in favor ofImmutableMutabilityPlan.instance()
UseH2JsonJdbcType
insteadNo longer usedUse the built-in support for enumsIs not called anymore
-
Deprecated Packages
-
Deprecated InterfacesInterfaceDescriptionUse settings,
TypeContributor
,FunctionContributor
orAdditionalMappingContributor
instead depending on needPrefer the form of these methods defined onBytecodeLazyAttributeInterceptor
insteadMoved, but still need this definition for ehcacheMoved toDialect
useAuditStrategy
instead.This is no longer implemented by any listenersinceSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecatedUseGeneratedValuesMutationDelegate
instead.seeUUIDGenerator
Consider using discovery instead to dynamically locate contributors.Use theSpecHints
form insteadUseEmbeddableDomainType
instead. Originally intended to describe the actual usage of an embeddable (the embedded) because it was intended to include the mapping (column, etc) information. However, that causes us to need multiple embeddable instances per embeddable class.The functionality of DiscriminatorMetadata,DiscriminatorType
andMetaType
have been consolidated intoEntityDiscriminatorMapping
andDiscriminatorConverter
SpatialDialects are no longer needed since Hibernate 6.0Will be removed in 6By definition, something "not yet implemented" is something we are actively seeking to removeUseTupleTransformer
and/orResultListTransformer
insteadReplaced byAttributeMapping
No direct replacement; seeEntityIdentifierMapping
No direct replacement
-
Deprecated ClassesClassDescriptionJust implement
SessionEventListener
directly.Moved toDialect
useDefaultAuditStrategy
instead.useValidityAuditStrategy
instead.sinceSession.replicate(java.lang.Object, org.hibernate.ReplicationMode)
is deprecatedbecause bothSource
andhbm.xml
are deprecated, though this implementation is instructiveSubclasses should now directly inheritPostInsertIdentifierGenerator
andBulkInsertionCapableIdentifierGenerator
, or even better, simply implementOnExecutionGenerator
directly.sinceUUIDHexGenerator
is deprecatedreplaced byAssigned
This remains around as an implementation detail ofhbm.xml
mappings.useUuidGenerator
useUuidGenerator
andUuidGenerator
insteadThis remains around as an implementation detail ofhbm.xml
mappings.UseClassLoaderService
insteadThis is a legacy of very ancient versions of Hibernate.Hibernate now uses StAX for XML processing and the role of this class is served now byLocalXmlResourceResolver
UseAvailableHints
insteadPlease get rid of it: such collections should be immutable.The functionality of DiscriminatorType,DiscriminatorMetadata
andMetaType
have been consolidated intoEntityDiscriminatorMapping
andDiscriminatorConverter
Spatial Dialects are no longer needed. Use the standard CockroachDB dialectsSpatial dialects are no longer neededUse "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.Spatial Dialects are no longer neededUse "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.Spatial Dialects are no longer neededSpatialDialects are no longer needed in Hibernate 6A SpatialDialect is no longer required. Use the standard Dialect for this database.A SpatialDialect is no longer required. Use the standard Dialect for this database.A SpatialDialect is no longer required. Use the standard Dialect for this database.A SpatialDialect is no longer required. Use the standard Dialect for this database.A SpatialDialect is no longer required. Use the standard Dialect for this database.A SpatialDialect is no longer required. Use the standard Dialect for this database.UseGeolatteSpatialCriteriaBuilder
insteadUseGeolatteSpatialCriteriaBuilder
insteadUseJTSSpatialCriteriaBuilder
insteaduseSQLStatementInspector
insteadsinceResultTransformer
is deprecatedsinceResultTransformer
is deprecatedsinceResultTransformer
is deprecatedsinceResultTransformer
is deprecatedsinceResultTransformer
is deprecatedNo direct replacement.No direct replacement.No direct replacement, though seeAttributeMapping
andAttributeMetadata
No direct replacementNo direct replacementNo direct replacementNo direct replacementNo direct replacementReplaced byEntityMappingType
. EntityMetamodel was a first attempt at what has becomeEntityMappingType
Replaced byEntityVersionMapping
No direct replacement; seeEntityIdentifierMapping
No direct replacementReplaced byAttributeMapping
UseH2JsonJdbcType
insteaduseFloatJdbcType
Use the built-in support for enums
-
Deprecated Enum ClassesEnum ClassDescriptionUse the JPA-defined
CascadeType
useQueryFlushMode
Use anExpectation
class instead.Use anExpectation
classUse Jakarta Persistence Nulls instead.This enum still has exactly one member, and was placed in a package from which it has no usages. It will be removed or moved.sinceSession.replicate(Object, ReplicationMode)
is deprecatedTo be replaced byCommonSpatialFunction
Replaced byEventType
as id-generation has been redefined using the new broader generation approach. For 7.0, this is kept around to supporthbm.xml
mappings and will be removed in 8.0 once we finally drophbm.xml
support.
-
Deprecated ExceptionsExceptionsDescriptionIt would be nice to be able to eliminate this completely
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionUse the JPA-defined
CascadeType
Prefer Table.comment()Per Comment, prefer Table.comment()UseColumn.secondPrecision()
which was introduced in JPA 3.2Use the new approach based onIdGeneratorType
.sinceGenericGenerator
is deprecated.useCurrentTimestamp
insteaduse annotation members of JPA association mapping annotations, for example,OneToMany.targetEntity()
Use JUnit 5 along with one of the Hibernate ORM's class-level test annotations (BaseUnitTest
,SessionFactory
,Jpa
,SessionFactoryFunctionalTesting
,ServiceRegistryFunctionalTesting
, ...) andAfterAll
. Alternatively to the Hibernate ORM test annotations, you can use@TestInstance(TestInstance.Lifecycle.PER_CLASS)
directly on your test.Use JUnit 5 along with one of the Hibernate ORM's class-level test annotations (BaseUnitTest
,SessionFactory
,Jpa
,SessionFactoryFunctionalTesting
,ServiceRegistryFunctionalTesting
, ...) andBeforeAll
. Alternatively to the Hibernate ORM test annotations, you can use@TestInstance(TestInstance.Lifecycle.PER_CLASS)
directly on your test.Use JUnit 5 andFailureExpected
instead.No replacement with JUnit 5 at the moment.No replacement with JUnit 5 at the moment.Use JUnit 5 andRequiresDialect
instead.Use JUnit 5 andRequiresDialectFeature
instead.Use JUnit 5 andRequiresDialects
instead.Use JUnit 5 andDisabledOnOs
orDisabledIf
.Use JUnit 5 andSkipForDialect
instead.Use JUnit 5 andSkipForDialectGroup
instead.
-
Deprecated FieldsFieldDescriptionRegister a
BytecodeProvider
through Java services.UseAvailableSettings.JAKARTA_LOCK_SCOPE
insteadUseAvailableSettings.JAKARTA_LOCK_TIMEOUT
insteadUseBatchSettings.BUILDER
insteadWill be removed, Hibernate ORM will use the BytecodeProvider implementation it finds on the classpath loading it via the standard ServiceLoader mechanism. Currently, there is only a single implementation which is included in Hibernate ORM, so it's not possible to override this. See HHH-17643Will be removed without replacement. See HHH-15641Will be removed without replacement. See HHH-15641this is only honored forhibernate-infinispan
UseCacheSettings.JAKARTA_SHARED_CACHE_MODE
insteadUseCacheSettings.JAKARTA_SHARED_CACHE_RETRIEVE_MODE
insteadUseCacheSettings.JAKARTA_SHARED_CACHE_STORE_MODE
insteadThis setting is only supported byC3P0ConnectionProvider
andDriverManagerConnectionProviderImpl
.The JPA-standard "jakarta.persistence.jtaDataSource" or "jakarta.persistence.nonJtaDataSource" setting are now preferred.UseJdbcSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION
insteadUseJdbcSettings.JAKARTA_HBM2DDL_DB_MINOR_VERSION
insteadUseJdbcSettings.JAKARTA_HBM2DDL_DB_NAME
insteadUseJdbcSettings.JAKARTA_HBM2DDL_DB_VERSION
insteadThe JPA-standard settingJdbcSettings.JAKARTA_JDBC_DRIVER
is now preferred.UseJdbcSettings.JAKARTA_HBM2DDL_CONNECTION
insteadUseJdbcSettings.JAKARTA_JDBC_DRIVER
insteadUseJdbcSettings.JAKARTA_JDBC_PASSWORD
insteadUseJdbcSettings.JAKARTA_JDBC_URL
insteadUseJdbcSettings.JAKARTA_JDBC_USER
insteadUseJdbcSettings.JAKARTA_JTA_DATASOURCE
insteadUseJdbcSettings.JAKARTA_NON_JTA_DATASOURCE
insteadThe JPA-standard settingJdbcSettings.JAKARTA_JDBC_PASSWORD
is now preferred.The JPA-standard settingJdbcSettings.JAKARTA_JDBC_URL
is now preferred.The JPA-standard settingJdbcSettings.JAKARTA_JDBC_USER
is now preferred.No longer has any effect. Since 7.0 (and removal of save/update processing), Hibernate always cascades PERSISTUseManagedBeanSettings.JAKARTA_CDI_BEAN_MANAGER
insteadUsePersistenceSettings.JAKARTA_PERSISTENCE_PROVIDER
insteadUsePersistenceSettings.JAKARTA_TRANSACTION_TYPE
insteadthis setting is not currently usedThe JPA-standard settingSchemaToolingSettings.JAKARTA_HBM2DDL_CREATE_SCHEMAS
is now preferred.Migrate toSchemaToolingSettings.JAKARTA_HBM2DDL_CREATE_SOURCE
insteadThe JPA-standard settingSchemaToolingSettings.JAKARTA_HBM2DDL_CREATE_SCRIPT_SOURCE
is now preferred.This setting is now ignored. Enable the log categoryorg.hibernate.session.metrics
to automatically collect and log session-level metrics.UseValidationSettings.JAKARTA_VALIDATION_FACTORY
insteadUseValidationSettings.JAKARTA_VALIDATION_MODE
insteadbecauseCascadeType.LOCK
is deprecatedUseGraphLanguageLexer.VOCABULARY
instead.UseGraphLanguageParser.VOCABULARY
instead.UseHqlLexer.VOCABULARY
instead.UseHqlParser.VOCABULARY
instead.UseSqlScriptLexer.VOCABULARY
instead.UseSqlScriptParser.VOCABULARY
instead.UseOrderingLexer.VOCABULARY
instead.UseOrderingParser.VOCABULARY
instead.This is not an elegant way to do anythingno longer set, useJdbcEnvironment.getIdentifierHelper()
UseExpectation.None
Use discovery instead.Consider using discovery instead to dynamically locate contributors.this feature of HQL is now deprecatedUseQueryParameterBindings.empty()
instead.in favor ofScrollableResultsConsumer.instance()
in favor ofImmutability.instance()
in favor ofImmutableMutabilityPlan.instance()
-
Deprecated MethodsMethodDescriptionuse
GenericGenerator.type()
for typesafetyCalling database procedures and functions throughNativeQuery
is no longer supported; useNamedStoredProcedureQuery
instead.useSQLDelete.verify()
with anExpectation
classuseSQLDeleteAll.verify()
with anExpectation
classuseSQLInsert.verify()
with anExpectation
classuseSQLUpdate.verify()
with anExpectation
classWith move to unified schema, this setting is now deprecated and will be removed once support for readinghbm.xml
files is fully removed.User should use NamedStoredProcedureQuery insteadNo longer usedSee discussion ofTypeContributor
in User Guide.UseTypeContributions.contributeType(BasicType)
instead.UseTypeContributions.contributeType(BasicType)
instead.No longer has any effect.with no replacement.hbm.xml
mapping file support is deprecated. Use extended orm.xml bindings instead.No longer supportedno longer calledwith no replacement.with no replacement.Will be removed without replacement. See HHH-15641Will be removed without replacement. See HHH-15641UseBytecodeProvider.getReflectionOptimizer(Class, Map)
inssteadUseC3P0ConnectionProvider.stop()
insteadonly because it's currently never calledIn dialect implementations, preferDatabaseVersion.makeCopyOrDefault(DatabaseVersion)
to gracefully default to the minimum supported version.In dialect implementations, preferDatabaseVersion.makeCopyOrDefault(DatabaseVersion)
to gracefully default to the minimum supported version.useDialect.getCheckCondition(String, Long[])
insteadNo longer usedUse Dialect.getNativeValueGenerationStrategy() insteadOverride the methodrenderInsertIntoNoColumns()
on thetranslator
returned by this dialect.We should not expose this directly: the other accessors that have been created as a replacement have better chances of skipping initializing this map, which is a good performance improvement.this will be removed: it provides too wide access, making it hard to optimise the internals for specific access needs. Consider using #iterateEntities instead.Use a providedSqlStringGenerationContext
instead.No longer usedNo longer usedthis method should be removed; alternative methods are available that better express the intent, allowing for better optimisations. Not aggressively removing this as it's an SPI, but also useful for testing and other contexts which are not performance sensitive. N.B. This might return an immutable map: do not use for mutations!Just as the method it overrides. Interceptors that deal with lazy state should implementBytecodeLazyAttributeInterceptor
Just as the method it overrides. Interceptors that deal with lazy state should implementBytecodeLazyAttributeInterceptor
Interceptors that deal with * lazy state should implementBytecodeLazyAttributeInterceptor
Only used in one place, will be removedthere's no good reason to expose this herethere's no reason to expose this herethere's no good reason to expose this herethere's no reason to expose this hereUse@AuditOverride(forClass=SomeEntity.class)
instead.useRevisionListener
instead. While this method is being deprecated, expect a new API for this in 6.0.Instead use setLockOptionswith no replacement.UseEventListenerGroup.clearListeners()
instead, which doesn't also reset the registeredDuplicationStrategy
s.this is not the most efficient way for iterating the event listeners. SeeEventListenerGroup.fireEventOnEachListener(Object, BiConsumer)
and its overloaded variants for better alternatives.There is no plan to remove this operation, but its use should be avoided sinceFilterDefinition
is an SPI type, and so this operation is a layer-breaker.UseGraphSemantic.fromHintName(java.lang.String)
insteadUseGraphSemantic.getJakartaHintName()
insteadExposed for tests only.UseDatabaseStructure.configure(Optimizer)
instead.Exposed for tests only.since it overrides a deprecated methodExposed for tests only.No longer usedNo longer usedNo longer usedDepending on context, eitherClassLoaderService
orClassLoaderAccess
should be preferredNo longer usedsincePersistenceUnitTransactionType
will be removed in JPA 4No longer has any effect.Always enabled. See JpaCompliance.isJpaCascadeComplianceEnabled()useCheckConstraint.constraintString(Dialect)
instead.No longer called, except from tests. UseKeyValue.createGenerator(Dialect, RootClass, Property, GeneratorSettings)
No longer supportedNo longer supportedNo longer supportednew read-by-position paradigm means that these generated aliases are no longer needednew read-by-position paradigm means that these generated aliases are no longer neededUseTable.addInitCommand(Function)
instead.Should build aQualifiedTableName
then useSqlStringGenerationContext.format(QualifiedTableName)
.UseDiscriminable.getDiscriminatorMapping()
instead.No longer supportedshould be removedNo longer usedHigly inefficient - do not use; this exists to support other deprecated methods and will be removed.UseRuntimeMetamodels.getEmbedded(NavigableRole)
insteadHibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here (generally),PluralAttributeMapping
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getElementDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getIdentifierDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getIndexDescriptor()
Read-by-position makes this irrelevant. Currently still used bySQLQueryParser
Hibernate is moving away fromType
. Corresponding mapping metamodel calls should be used instead - here,PluralAttributeMapping.getKeyDescriptor()
by the supertypesHibernate no longer uses aliases to read from result setsHibernate no longer uses aliases to read from result setsHibernate no longer uses aliases to read from result setsHibernate no longer uses aliases to read from result setsThis feature is no longer supportedUseSelectableMapping.getSelectionExpression()
insteadUseEntityPersister.getValue(java.lang.Object, int)
insteadUseEntityPersister.getValues(java.lang.Object)
insteadNo longer calledOnly ever used from places where we really want to useSelectStatement
(select generator)InsertSelectStatement
UpdateStatement
DeleteStatement
UseEntityPersister.canReadFromCache()
and/orEntityPersister.canWriteToCache()
depending on needNo longer used in ORM coreuseEntityMutationTarget.getInsertDelegate()
insteadNo longer used.org.hibernate.query.criteria.HibernateCriteriaBuilder.arrayContainsAllNullable(Expression<T[]>, T[]) org.hibernate.query.criteria.HibernateCriteriaBuilder.arrayContainsAllNullable(T[], Expression<T[]>) This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Subquery, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Subquery, org.hibernate.query.common.JoinType, boolean)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(Class, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(EntityDomainType, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.join(JpaCteCriteria, org.hibernate.query.common.JoinType)
This method is a layer-breaker, leaking the SQM typeSqmJoinType
onto an API. It will be removed. UseJpaFrom.joinLateral(Subquery, org.hibernate.query.common.JoinType)
No longer calledThe overloaded formQueryProducer.createQuery(String, Class)
which takes a result type is strongly recommended in preference to this method, since it returns a typedQuery
object, and because it is able to use the given result type to infer theselect
list, and even sometimes thefrom
clause. Alternatively,QueryProducer.createSelectionQuery(String, Class)
is preferred for queries, andQueryProducer.createMutationQuery(String)
for insert, update, and delete statements.The overloaded formQueryProducer.createSelectionQuery(String, Class)
which takes a result type is strongly recommended in preference to this method, since it returns a typedSelectionQuery
object, and because it is able to use the given result type to infer theselect
list, and even sometimes thefrom
clause.UseSqmPathSource.findSubPathSource(String, boolean)
insteadUse #SqmPathSource.getSubPathSource(String, boolean)
insteadBecause the semantics of this method may change in a future release. UseSession.find(Class, Object)
instead.The semantics of this method may change in a future release. UseSession.find(Class, Object, LockMode)
instead.The semantics of this method may change in a future release. UseSession.find(Class, Object, LockOptions)
instead.The semantics of this method may change in a future release.The semantics of this method may change in a future release.The semantics of this method may change in a future release.With no real replacement. For some use cases tryStatelessSession.upsert(Object)
.With no real replacement. For some use cases tryStatelessSession.upsert(Object)
.UseSessionBuilder.tenantIdentifier(Object)
insteadThere is no plan to remove this operation, but its use should be avoided sinceFilterDefinition
is an SPI type, and so this operation is a layer-breaker.There is no plan to remove this operation, but its use should be avoided sinceSessionFactoryOptions
is an SPI type, and so this operation is a layer-breaker.useSharedSessionBuilder.connectionHandlingMode()
instead.No longer calledWill be removed. Use the other methods to visit each operation.Will be removed. Use the other methods to visit each operation.UseStatelessSessionBuilder.tenantIdentifier(Object)
insteadNo longer supportedUseNonIdentifierAttribute.isDirtyCheckable()
insteadnot appropriate for named enum or array typesnot appropriate for named enum or array typesnot appropriate for named enum or array types, useDdlType.getTypeName(Size, Type, DdlTypeRegistry)
insteadnot appropriate for named enum or array types, useDdlType.getTypeName(Size, Type, DdlTypeRegistry)
insteadnot appropriate for named enum or array types, useDdlTypeRegistry.getTypeName(int, Size, Type)
insteadnot appropriate for named enum or array types, useDdlTypeRegistry.getTypeName(int, Size, Type)
insteadNo longer usedThis operation is not very typesafe, and we're migrating away from its useThis simply isn't a very sensible place to hang theServiceRegistry
This operation is not very typesafe, and we're migrating away from its useIs not called anymore
-
Deprecated ConstructorsConstructorDescriptionprovide a
DatabaseVersion
currently used by Hibernate Reactive This version of the constructor should handle the case in which we do actually have the option to access the DatabaseMetaData, but since Hibernate Reactive is currently not making use of it we take a shortcut.in favor ofSize(Integer, Integer, Long)
in favor ofSize(Integer, Integer, Long)
useRefreshEvent(Object, LockOptions, EventSource)
instead.use the default constructor insteaduseStandardStack(Object)
instead.this constructor does not carry information about the query which caused the failurethis constructor does not carry information about the query which caused the failurethis constructor does not carry information about the query which caused the failurewas previously used for HQL. UseSqmUpdateStatement(NodeBuilder)
insteadwas previously used for Criteria. UseSqmUpdateStatement(Class, SqmCriteriaNodeBuilder)
instead.this constructor does not carry information about the query which caused the failurethis constructor does not carry information about the query which caused the failurethis constructor does not carry information about the query which caused the failure
-
Deprecated Enum Constants
-
Deprecated Annotation Interface ElementsAnnotation Interface ElementDescriptionuse
GenericGenerator.type()
for typesafetyCalling database procedures and functions throughNativeQuery
is no longer supported; useNamedStoredProcedureQuery
instead.useSQLDelete.verify()
with anExpectation
classuseSQLDeleteAll.verify()
with anExpectation
classuseSQLInsert.verify()
with anExpectation
classuseSQLUpdate.verify()
with anExpectation
classUse@AuditOverride(forClass=SomeEntity.class)
instead.
Column.secondPrecision()
which was introduced in JPA 3.2