Skip to content

Commit

Permalink
HHH-17441 - Deprecate @comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sebersole committed Nov 19, 2023
1 parent 551dde5 commit be8e8b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
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 @@ -47,12 +49,15 @@
*
* @author Yanming Zhou
* @author Gavin King
*
* @deprecated Prefer {@linkplain Table#comment()}
*/
@TypeBinderType(binder = CommentBinder.class)
@AttributeBinderType(binder = CommentBinder.class)
@Target({METHOD, FIELD, TYPE})
@Retention(RUNTIME)
@Repeatable(Comments.class)
@Deprecated
public @interface Comment {
/**
* The text of the comment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
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 All @@ -24,11 +26,14 @@
* they must have distinct {@link Comment#on() on} members.
*
* @author Gavin King
*
* @deprecated Per {@linkplain Comment}, prefer {@linkplain Table#comment()}
*/
@TypeBinderType(binder = CommentsBinder.class)
@AttributeBinderType(binder = CommentsBinder.class)
@Target({METHOD, FIELD, TYPE})
@Retention(RUNTIME)
@Deprecated
public @interface Comments {
Comment[] value();
}

0 comments on commit be8e8b2

Please sign in to comment.