Hibernate defines five types of identifier generation strategies:
AUTO - either an identifier column, sequence or table depending on the underlying database
TABLE - table with identifier
IDENTIFICATION - identifiers column
SEQUENCE - sequence
copy of identity - the identity is copied from another object
Table example
@Id @GeneratedValue(strategy=GenerationType.TABLE , generator="employee_generator") @TableGenerator(name="employee_generator", table="pk_table", pkColumnName="name", valueColumnName="value", allocationSize=100) @Column(name="employee_id") private Long employeeId;
For more details, check the link.
user2530633 Aug 25 '14 at 17:16 2014-08-25 17:16
source share