Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@
* @author Gavin King
*
* @see DialectOverride.Check
*
* @deprecated Prefer {@link jakarta.persistence.Table#check},
* {@link jakarta.persistence.Column#check}, etc.,
* with {@link jakarta.persistence.CheckConstraint @CheckConstraint}.
*/
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
@Repeatable(Checks.class)
@Deprecated(since = "7")
public @interface Check {
/**
* The optional name of the check constraint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.persistence.Table;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
Expand Down Expand Up @@ -49,7 +47,8 @@
* @author Yanming Zhou
* @author Gavin King
*
* @deprecated Prefer {@linkplain Table#comment()}
* @deprecated Prefer {@link jakarta.persistence.Table#comment},
* {@link jakarta.persistence.Column#comment}, etc.
*/
@TypeBinderType(binder = CommentBinder.class)
@AttributeBinderType(binder = CommentBinder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.annotations;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
* Generic parameter (basically a key/value combination) used to parametrize other annotations.
* Generic parameter (a key/value pair) used to parametrize other annotations.
*
* @author Emmanuel Bernard
*
* @see Type#parameters
* @see CollectionType#parameters
* @see CollectionIdType#parameters
* @see MapKeyType#parameters
* @see GenericGenerator#parameters
*/
@Target({})
@Retention(RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* may be set by using a nested type element for the property element in the mapping
* file, or by defining a typedef.
*
* @see org.hibernate.annotations.Type#parameters
*
* @author Michael Gloegl
*/
public interface ParameterizedType {
Expand Down
22 changes: 21 additions & 1 deletion migration-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,32 @@ In Hibernate 7, these SQL `UPDATE` statements only occur if the `@OrderColumn` i
Since Vibur and Proxool are no longer actively developed, support for these connection pools was removed.
Use Agroal or HikariCP instead.

== Converters incompatible with annotations

JPA ``AttributeConverter``s are incompatible with the annotations `@Id`, `@Version`, `@Enumerated`, `@Embedded`, `@Temporal` and all association-mapping annotations.
Previously, any converter applied to an attribute with an incompatible annotation was simply ignored.
Hibernate now reports an error in this situation.

This includes auto-applied converters.
To suppress the error for an auto-applied converter, use `@Convert(disableConversion=true)`.

== Deprecations

* `@Comment` is deprecated in favor of the JPA 3.2 `comment` members
* `@Comment` is deprecated in favor of the JPA 3.2 `@CheckConstraint` and `check` members
* `NullPrecedence` is deprecated in favor of JPA 3.2 `Nulls`
* `@FractionalSeconds` is deprecated in favor of JPA 3.2 `secondPrecision`
* `DynamicParameterizedType` is deprecated
* `Session.get()` is deprecated in favor of `find()`
* `@Cascade` and `org.hibernate.annotations.CascadeType` are deprecated in favor of JPA `cascade` and `CascadeType`
* `org.hibernate.annotations.FlushModeType` is deprecated in favor of `QueryFlushMode`

[[cleanup]]
== Cleanup

* Annotations
** Removed `@Persister`
** Removed `@Proxy` - see <<proxy-annotation>>
** Removed `@Proxy` -- see <<proxy-annotation>>
** Removed `@SelectBeforeUpdate`
** Removed `@DynamicInsert#value` and `@DynamicUpdate#value`
** Removed `@Loader`
Expand Down
Loading