HHH-17441 - Deprecate @Comment

This commit is contained in:
Steve Ebersole 2023-11-19 06:39:42 -06:00
parent 92d817bb27
commit b1210dda69
2 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,8 @@ import java.lang.annotation.Repeatable;
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;
@ -49,13 +51,14 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* @author Yanming Zhou
* @author Gavin King
*
* @remove JPA 3.2 adds a comment attribute to {@linkplain jakarta.persistence.Table}
* @deprecated Prefer {@linkplain Table#comment()}
*/
@TypeBinderType(binder = CommentBinder.class)
@AttributeBinderType(binder = CommentBinder.class)
@Target({METHOD, FIELD, TYPE})
@Retention(RUNTIME)
@Repeatable(Comments.class)
@Deprecated
@Remove
public @interface Comment {
/**

View File

@ -12,6 +12,8 @@ import org.hibernate.binder.internal.CommentsBinder;
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;
@ -25,12 +27,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
*
* @author Gavin King
*
* @remove JPA 3.2 adds a comment attribute to {@linkplain jakarta.persistence.Table}
* @deprecated Per {@linkplain Comment}, prefer {@linkplain Table#comment()}
*/
@TypeBinderType(binder = CommentsBinder.class)
@AttributeBinderType(binder = CommentsBinder.class)
@Target({METHOD, FIELD, TYPE})
@Retention(RUNTIME)
@Deprecated
@Remove
public @interface Comments {
Comment[] value();