Deprecated API
Contents
-
Exceptions Exceptions Description org.hibernate.cfg.RecoverableException Was only ever referenced in a single place, in an extremely dubious way.
-
Annotation Types Annotation Type Description org.hibernate.annotations.ForeignKey use the JPA 2.1ForeignKey
annotationorg.hibernate.annotations.GeneratorType ValueGenerationType
andAnnotationValueGeneration
now provide a much more powerful and typesafe alternativeorg.hibernate.annotations.Index UseIndex
instead.org.hibernate.annotations.IndexColumn org.hibernate.annotations.LazyCollection - Use the JPA-defined
FetchType.EAGER
instead ofLazyCollection(FALSE)
. - Use static methods of
Hibernate
, for exampleHibernate.size(Collection)
,Hibernate.contains(Collection, Object)
, orHibernate.get(Map, Object)
instead ofLazyCollection(EXTRA)
.
org.hibernate.annotations.LazyToOne use JPA annotations to specify theFetchType
org.hibernate.annotations.Loader org.hibernate.annotations.Persister Alternative depends on reason for custom persisterorg.hibernate.annotations.Polymorphism This annotation is hardly ever useful.org.hibernate.annotations.Proxy This annotation is almost never useful.org.hibernate.annotations.SelectBeforeUpdate SinceSession.update(Object)
is deprecatedorg.hibernate.annotations.Source useCurrentTimestamp
insteadorg.hibernate.annotations.Table The options available here are all now offered by other newer and better-designed annotations in this package. This annotation will soon be removed, since it's very annoying to have two annotations named@Table
.org.hibernate.annotations.Tables sinceTable
is deprecatedorg.hibernate.annotations.Target use annotation members of JPA association mapping annotations, for example,OneToMany.targetEntity()
org.hibernate.testing.AfterClassOnce 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.org.hibernate.testing.BeforeClassOnce 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.org.hibernate.testing.FailureExpected Use JUnit 5 andFailureExpected
instead.org.hibernate.testing.OnExpectedFailure No replacement with JUnit 5 at the moment.org.hibernate.testing.OnFailure No replacement with JUnit 5 at the moment.org.hibernate.testing.RequiresDialect Use JUnit 5 andRequiresDialect
instead.org.hibernate.testing.RequiresDialectFeature Use JUnit 5 andRequiresDialectFeature
instead.org.hibernate.testing.RequiresDialects Use JUnit 5 andRequiresDialects
instead.org.hibernate.testing.Skip Use JUnit 5 andDisabledOnOs
orDisabledIf
.org.hibernate.testing.SkipForDialect Use JUnit 5 andSkipForDialect
instead.org.hibernate.testing.SkipForDialects Use JUnit 5 andSkipForDialectGroup
instead.org.hibernate.testing.TestForIssue UseJiraKey
instead. - Use the JPA-defined
-
Enum Constants Enum Constant Description org.hibernate.annotations.CascadeType.DELETE sinceSession.delete(Object)
is deprecatedorg.hibernate.annotations.CascadeType.REPLICATE sinceSession.replicate(Object, ReplicationMode)
is deprecatedorg.hibernate.annotations.CascadeType.SAVE_UPDATE sinceSession.saveOrUpdate(Object)
is deprecatedorg.hibernate.annotations.LazyCollectionOption.EXTRA use operations ofHibernate
org.hibernate.annotations.LazyCollectionOption.FALSE useFetchType.EAGER
org.hibernate.annotations.LazyCollectionOption.TRUE useFetchType.LAZY
org.hibernate.annotations.LazyToOneOption.FALSE useFetchType.EAGER
org.hibernate.annotations.LazyToOneOption.NO_PROXY this setting no longer has any useful effectorg.hibernate.annotations.LazyToOneOption.PROXY useFetchType.LAZY