Annotation Interface NativeGenerator
@Target({METHOD,FIELD,TYPE,PACKAGE,MODULE})
@Retention(RUNTIME)
@Incubating(since="7.0")
public @interface NativeGenerator
Generator that picks a strategy based on the dialect.
When placed on a package-info.java or module-info.java,
the generator applies to any entity in the package or module whose
identifier uses @GeneratedValue
without explicitly specifying a generator.
- Since:
- 7.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionConfigures the sequence generation when the dialect reports GenerationType.SEQUENCE as its native generatorConfigures the table generation when the dialect reports GenerationType.TABLE as its native generator
-
Element Details
-
sequenceForm
SequenceGenerator sequenceFormConfigures the sequence generation when the dialect reports GenerationType.SEQUENCE as its native generator- Default:
@jakarta.persistence.SequenceGenerator
-
tableForm
TableGenerator tableFormConfigures the table generation when the dialect reports GenerationType.TABLE as its native generator- Default:
@jakarta.persistence.TableGenerator
-