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
  • Element Details

    • sequenceForm

      SequenceGenerator sequenceForm
      Configures the sequence generation when the dialect reports GenerationType.SEQUENCE as its native generator
      Default:
      @jakarta.persistence.SequenceGenerator
    • tableForm

      TableGenerator tableForm
      Configures the table generation when the dialect reports GenerationType.TABLE as its native generator
      Default:
      @jakarta.persistence.TableGenerator