diff --git a/.gitignore b/.gitignore index fdf52d7..178b075 100644 --- a/.gitignore +++ b/.gitignore @@ -88,4 +88,4 @@ local.properties *.launch # SQLite -/src/main/resources/*.db +prototype/src/main/resources/*.db diff --git a/prototype/src/main/java/org/hso/ecommerce/entities/Customer.java b/prototype/src/main/java/org/hso/ecommerce/entities/Customer.java index 42e85e2..609259a 100644 --- a/prototype/src/main/java/org/hso/ecommerce/entities/Customer.java +++ b/prototype/src/main/java/org/hso/ecommerce/entities/Customer.java @@ -7,7 +7,8 @@ import javax.persistence.*; public class Customer { @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "id_Sequence") + @SequenceGenerator(name = "id_Sequence", sequenceName = "ID_SEQ") public Long id; public String lastname; public String firstname; diff --git a/prototype/src/main/resources/application.properties b/prototype/src/main/resources/application.properties index 6ef9ba3..f1ec900 100644 --- a/prototype/src/main/resources/application.properties +++ b/prototype/src/main/resources/application.properties @@ -9,6 +9,7 @@ logging.level.org.springframework.web=INFO spring.datasource.url = jdbc:sqlite:src/main/resources/test.db spring.datasource.driverClassName = org.sqlite.JDBC spring.jpa.properties.hibernate.dialect = org.hso.ecommerce.db.SQLiteDialect +spring.jpa.hibernate.ddl-auto=update # ---------------------------------------- # WEB PROPERTIES