Bernardo-MG / jpa-example

An example showing how to set up and test JPA classes.
MIT License
0 stars 0 forks source link

Update id generators #33

Closed Bernardo-MG closed 5 years ago

Bernardo-MG commented 6 years ago

It seems that the id generation setup has changed to:

@Id
@GeneratedValue(generator="increment")
@GenericGenerator(name="increment", strategy = "increment")
private Integer id;
Bernardo-MG commented 6 years ago

http://docs.jboss.org/hibernate/orm/5.0/quickstart/html/#hibernate-gsg-tutorial-annotations-entity

Bernardo-MG commented 5 years ago

http://docs.jboss.org/hibernate/orm/5.4/quickstart/html_single/#hibernate-gsg-tutorial-annotations-entity

Bernardo-MG commented 5 years ago

This is specific to Hibernate. Won't be used, as this example is for generic JPA