Indicates that the persistence provider should pick an appropriate strategy for the particular database.
- For a primary key of type
UUIDorString, this is equivalent toGenerationType.UUID. - For a primary key of type
Long,Integer,long, orint, the provider selects betweenGenerationType.TABLE,GenerationType.SEQUENCE, andGenerationType.IDENTITY.
The AUTO generation strategy may expect a database resource to exist, or it may attempt to create one. A vendor may provide documentation on how to create such resources in the event that it does not support schema generation or cannot create the schema resource at runtime.
- Since:
- Jakarta Persistence (JPA) 1.0