From 82db252422a989d22de4c6106c5fa698f123e820 Mon Sep 17 00:00:00 2001 From: Gavin Date: Tue, 29 Nov 2022 23:40:52 +0100 Subject: [PATCH] HHH-15781 deprecate @GenericGenerator(strategy) in favor of @GenericGenerator(type) --- .../java/org/hibernate/annotations/GenericGenerator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerator.java b/hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerator.java index dae39a27d4..d2cc142ae1 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/GenericGenerator.java @@ -76,6 +76,8 @@ public @interface GenericGenerator { /** * The type of identifier generator, a class implementing * {@link org.hibernate.id.IdentifierGenerator}. + * + * @since 6.2 */ Class type() default IdentifierGenerator.class; /** @@ -84,7 +86,10 @@ public @interface GenericGenerator { *
  • a built-in Hibernate id generator, or *
  • a custom class implementing {@link org.hibernate.id.IdentifierGenerator}. * + * + * @deprecated use {@link #type()} for typesafety */ + @Deprecated(since="6.2") String strategy() default "native"; /** * Parameters to be passed to {@link org.hibernate.id.IdentifierGenerator#configure}