What is ID generator in hibernate?
Keeping this in consideration, what is identifier in hibernate?
Identifiers in Hibernate represent the primary key of an entity. This implies the values are unique so that they can identify a specific entity, that they aren't null and that they won't be modified.
Also question is, what is sequence generator in hibernate?
@Target(value={TYPE,METHOD,FIELD}) @Retention(value=RUNTIME) public @interface SequenceGenerator. Defines a primary key generator that may be referenced by name when a generator element is specified for the GeneratedValue annotation.
The @GeneratedValue annotation is used to specify how the primary key should be generated. In your example you are using an Identity strategy which. Indicates that the persistence provider must assign primary keys for the entity using a database identity column.