allow @CollectionIdType to be used as meta-annotation
this was always intended, I believe
This commit is contained in:
parent
e89015fd8c
commit
6523599106
|
@ -11,6 +11,7 @@ import java.lang.annotation.Target;
|
|||
|
||||
import org.hibernate.usertype.UserType;
|
||||
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
@ -20,7 +21,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|||
*
|
||||
* @since 6.0
|
||||
*/
|
||||
@Target({METHOD, FIELD})
|
||||
@Target({METHOD, FIELD, ANNOTATION_TYPE})
|
||||
@Retention(RUNTIME)
|
||||
public @interface CollectionIdType {
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
*/
|
||||
package org.hibernate.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/**
|
||||
* Explicitly specifies the target entity type in an association,
|
||||
|
@ -22,8 +24,8 @@ import java.lang.annotation.RetentionPolicy;
|
|||
* {@link jakarta.persistence.OneToMany#targetEntity()}
|
||||
*/
|
||||
@Deprecated(since = "6.2")
|
||||
@java.lang.annotation.Target({ElementType.FIELD, ElementType.METHOD})
|
||||
@Retention( RetentionPolicy.RUNTIME )
|
||||
@java.lang.annotation.Target({FIELD, METHOD})
|
||||
@Retention(RUNTIME)
|
||||
public @interface Target {
|
||||
/**
|
||||
* The target entity type.
|
||||
|
|
Loading…
Reference in New Issue