Deprecated API
Contents
-
Interfaces Interface Description org.hibernate.BasicQueryContract (since 5.2) useCommonQueryContract
instead.org.hibernate.boot.spi.AdditionalJaxbMappingProducer Intended for Envers integration until we can migrate Envers away from XML generation for building its model.org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer.InterceptorImplementor Prefer the form of these methods defined onBytecodeLazyAttributeInterceptor
insteadorg.hibernate.cache.RegionFactory Moved, but still need this definition for ehcacheorg.hibernate.cache.spi.QueryCache UseQueryResultsCache
instead -CacheImplementor.getQueryResultsCache(java.lang.String)
rather thanCacheImplementor.getQueryCache()
org.hibernate.cache.spi.UpdateTimestampsCache UseTimestampsCache
insteadorg.hibernate.cfg.NamingStrategy Aorg.hibernate.cfg.naming.NamingStrategyDelegator
should be used instead.org.hibernate.ejb.AvailableSettings use org.hibernate.jpa.AvailableSettingsorg.hibernate.ejb.HibernateEntityManager UseHibernateEntityManager
insteadorg.hibernate.ejb.HibernateEntityManagerFactory UseHibernateEntityManagerFactory
insteadorg.hibernate.ejb.HibernateQuery UseHibernateQuery
insteadorg.hibernate.engine.spi.CacheImplementor Moved toCacheImplementor
org.hibernate.engine.spi.SessionOwner (since 5.2) since consolidating hibernate-entitymanager into hibernate-core I believe this is no longer needed.org.hibernate.integrator.spi.ServiceContributingIntegrator A separateServiceContributor
should be used instead.org.hibernate.jmx.spi.JmxService Scheduled for removal in 6.0; see https://hibernate.atlassian.net/browse/HHH-14847 and https://hibernate.atlassian.net/browse/HHH-14846org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager UseExtendedBeanManager
insteadorg.hibernate.jpa.event.spi.jpa.ExtendedBeanManager.LifecycleListener UseExtendedBeanManager.LifecycleListener
insteadorg.hibernate.jpa.HibernateEntityManager (snce 5.2) Use Session (or SessionImplementor), as it now extends EntityManager directlyorg.hibernate.jpa.HibernateEntityManagerFactory (since 5.2) Use SessionFactory (or SessionFactoryImplementor) as it now extends EntityManagerFactory directlyorg.hibernate.jpa.spi.HibernateEntityManagerFactoryAware (since 5.2) Why do we need an over-arching access to HibernateEntityManagerFactory across multiple contract hierarchies?org.hibernate.jpa.spi.HibernateEntityManagerImplementor (since 5.2) move these methods to SessionImplementororg.hibernate.mapping.RelationalModel (since 5.2) not needed anymore.org.hibernate.Query (since 5.2) useQuery
insteadorg.hibernate.secure.spi.JaccService Support for JACC will be removed in 6.0org.hibernate.secure.spi.PermissionCheckEntityInformation Support for JACC will be removed in 6.0org.hibernate.service.spi.Manageable Scheduled for removal in 6.0; see https://hibernate.atlassian.net/browse/HHH-14847 and https://hibernate.atlassian.net/browse/HHH-14846org.hibernate.SQLQuery (since 5.2) useNativeQuery
instead.org.hibernate.stat.NaturalIdCacheStatistics (since 5.3) UseNaturalIdStatistics
- unfortunately the old statistics contracts exposed these by region name, rather than the name of the entity defining the natural-idorg.hibernate.stat.SecondLevelCacheStatistics UseCacheRegionStatistics
insteadorg.hibernate.tool.hbm2ddl.ConnectionHelper Everything in this package has been replaced withSchemaManagementTool
and friends.org.hibernate.tuple.Property Use the directAttribute
hierarchyorg.hibernate.type.descriptor.WrapperOptionsContext (since 5.2) Just directly implement WrapperOptionsorg.hibernate.type.TypeFactory.TypeScope UseTypeConfiguration
/TypeConfiguration.Scope
instead
-
Classes Class Description org.hibernate.cfg.AttributeConverterDefinition (since 5.3) forces the converter instance to be built too early, which precludes the ability to resolve them from CDI, etc. SeeConverterDescriptor
insteadorg.hibernate.cfg.Settings UseSessionFactoryOptions
instead.org.hibernate.criterion.Expression UseRestrictions
insteadorg.hibernate.criterion.IlikeExpression PreferLikeExpression
which now has case-insensitivity capability.org.hibernate.dialect.DerbyDialect HHH-6073org.hibernate.dialect.MySQL57InnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQL5InnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQLInnoDBDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.dialect.MySQLMyISAMDialect Use "hibernate.dialect.storage_engine=myisam" environment variable or JVM system property instead.org.hibernate.dialect.Oracle9Dialect Use either Oracle9iDialect or Oracle10gDialect insteadorg.hibernate.dialect.OracleDialect Use Oracle8iDialect instead.org.hibernate.dialect.PostgreSQLDialect usePostgreSQL82Dialect
insteadorg.hibernate.id.MultipleHiLoPerTableGenerator UseTableGenerator
instead.org.hibernate.id.SequenceGenerator UseSequenceStyleGenerator
insteadorg.hibernate.id.SequenceHiLoGenerator See deprecation discussion onSequenceGenerator
org.hibernate.id.SequenceIdentityGenerator See deprecation discussion onSequenceGenerator
org.hibernate.lob.ReaderInputStream Should not be used anymore.org.hibernate.mapping.PropertyGeneration This is replaced byValueGeneration
andGenerationTiming
org.hibernate.property.access.spi.EnhancedGetterMethodImpl No longer used;GetterFieldImpl
orGetterMethodImpl
should be used instead.org.hibernate.secure.spi.GrantedPermission Support for JACC will be removed in 6.0org.hibernate.secure.spi.JaccIntegrator Support for JACC will be removed in 6.0org.hibernate.secure.spi.JaccPermissionDeclarations Support for JACC will be removed in 6.0org.hibernate.spatial.dialect.mysql.MySQL56InnoDBSpatialDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.spatial.dialect.mysql.MySQL5InnoDBSpatialDialect Use "hibernate.dialect.storage_engine=innodb" environment variable or JVM system property instead.org.hibernate.spatial.dialect.postgis.PostgisDialect "Use one of the PostgisPGNNDialect classes"org.hibernate.tool.hbm2ddl.ColumnMetadata UseColumnInformation
orColumnInformationImpl
insteadorg.hibernate.tool.hbm2ddl.ForeignKeyMetadata Everything in this package has been replaced withSchemaManagementTool
and friends.org.hibernate.tool.hbm2ddl.IndexMetadata Everything in this package has been replaced withSchemaManagementTool
and friends.org.hibernate.tool.hbm2ddl.SchemaUpdateCommand Everything in this package has been replaced withSchemaManagementTool
and friends.org.hibernate.tool.hbm2ddl.TableMetadata Everything in this package has been replaced withSchemaManagementTool
and friends.org.hibernate.tool.instrument.javassist.InstrumentTask This is the legacy Ant-task Hibernate provided historically to perform its old-school bytecode instrumentation. That has been replaced wholesale with a new approach to bytecode manipulation offering 3 build-time variations for Ant, Maven and Gradle.org.hibernate.tuple.StandardProperty Use one of theAttribute
-based impls instead.org.hibernate.type.descriptor.java.JavaTypeDescriptorRegistry Use (5.3) UseJavaTypeDescriptorRegistry
insteadorg.hibernate.type.descriptor.sql.SqlTypeDescriptorRegistry (5.3) UseSqlTypeDescriptorRegistry
instead.org.hibernate.type.TypeFactory UseTypeConfiguration
insteadorg.hibernate.type.TypeHelper with no real replacement. this was always intended as an internal classorg.hibernate.type.TypeResolver (since 5.3) No replacement, access to and handling of Types will be much different in 6.0
-
Enums Enum Description org.hibernate.annotations.SortType SinceSort
is deprecated.org.hibernate.envers.ModificationStore since 5.2, to be removed in 6.0 with no replacement.org.hibernate.secure.spi.PermissibleAction Support for JACC will be removed in 6.0
-
Exceptions Exceptions Description org.hibernate.cfg.RecoverableException Was only ever referenced in a single place, in an extremely dubious way.org.hibernate.MappingNotFoundException UseMappingNotFoundException
instead.org.hibernate.OptimisticLockException UseOptimisticEntityLockException
insteadorg.hibernate.tool.hbm2ddl.ImportScriptException Everything in this package has been replaced withSchemaManagementTool
and friends.
-
Annotation Types Annotation Type Description org.hibernate.annotations.AccessType UseAttributeAccessor
instead; renamed to avoid confusion with the JPAAccessType
enum.org.hibernate.annotations.Entity See individual attributes for intended replacements. To be removed in 4.1org.hibernate.annotations.ForeignKey Prefer the JPA 2.1 introducedForeignKey
instead.org.hibernate.annotations.Index UsingIndex
instead.org.hibernate.annotations.IndexColumn Prefer the standard JPAOrderColumn
annotation and the Hibernate specificListIndexBase
(for replacingIndexColumn.base()
).org.hibernate.annotations.Sort UseSortComparator
orSortNatural
instead depending on need.
-
Enum Constants Enum Constant Description org.hibernate.annotations.CascadeType.DELETE_ORPHAN use @OneToOne(orphanRemoval=true) or @OneToMany(orphanRemoval=true)org.hibernate.annotations.CascadeType.EVICT org.hibernate.annotations.FlushModeType.NEVER use MANUAL, will be removed in a subsequent releaseorg.hibernate.LockMode.FORCE instead use PESSIMISTIC_FORCE_INCREMENTorg.hibernate.LockMode.UPGRADE instead use PESSIMISTIC_WRITE
-
Annotation Type Elements Annotation Type Element Description org.hibernate.annotations.Entity.dynamicInsert() useDynamicInsert
insteadorg.hibernate.annotations.Entity.dynamicUpdate() UseDynamicUpdate
insteadorg.hibernate.annotations.Entity.mutable() useImmutable
org.hibernate.annotations.Entity.optimisticLock() useOptimisticLocking
instead.org.hibernate.annotations.Entity.persister() usePersister
insteadorg.hibernate.annotations.Entity.polymorphism() usePolymorphism
insteadorg.hibernate.annotations.Entity.selectBeforeUpdate() UseSelectBeforeUpdate
insteadorg.hibernate.annotations.Tuplizer.entityMode() should use #entityModeType insteadorg.hibernate.envers.Audited.auditParents() Use@AuditOverride(forClass=SomeEntity.class)
instead.org.hibernate.envers.Audited.modStore() since 5.2, to be removed in 6.0 with no replacement.