In the descriptions of the @GeneratedValue, @SequenceGenerator, and @TableGenerator annotations in the Java Persistence Specification, certain defaults are noted as specific to the persistence provider. The default persistence provider's primary key generation defaults are listed here.
@GeneratedValue defaults are as follows:
Using strategy=AUTO (or no strategy) creates a @TableGenerator named SEQ_GEN with default settings. Specifying a generator has no effect.
Using strategy=TABLE without specifying a generator creates a @TableGenerator named SEQ_GEN_TABLE with default settings. Specifying a generator but no @TableGenerator creates and names a @TableGenerator with default settings.
Using strategy=IDENTITY or strategy=SEQUENCE produces the same results, which are database-specific.
For Oracle databases, not specifying a generator creates a @SequenceGenerator named SEQ_GEN_SEQUENCE with default settings. Specifying a generator but no @SequenceGenerator creates and names a @SequenceGenerator with default settings.
For PostgreSQL databases, a SERIAL column named entity-table_pk-column_SEQ is created.
For MySQL databases, an AUTO_INCREMENT column is created.
For other supported databases, an IDENTITY column is created.
The @SequenceGenerator annotation has one default specific to the default provider. The default sequenceName is the specified name.
@TableGenerator defaults are as follows:
The default table is SEQUENCE.
The default pkColumnName is SEQ_NAME.
The default valueColumnName is SEQ_COUNT.
The default pkColumnValue is the specified name, or the default name if no name is specified.