diff --git a/modules/ROOT/pages/chapter03/chapter03.adoc b/modules/ROOT/pages/chapter03/chapter03.adoc index 7b0fb366..cebba3b4 100644 --- a/modules/ROOT/pages/chapter03/chapter03.adoc +++ b/modules/ROOT/pages/chapter03/chapter03.adoc @@ -140,6 +140,7 @@ package io.microprofile.tutorial.store.product.entity; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; import jakarta.validation.constraints.NotNull; @Entity @@ -152,7 +153,7 @@ import jakarta.validation.constraints.NotNull; public class Product { @Id - @GeneratedValue + @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotNull @@ -471,6 +472,7 @@ $ curl http://localhost:9080/mp-ecomm-store/api/products [source, java] ---- @DELETE +@Transactional @Path("products/{id}") public Response deleteProduct(@PathParam("id") Long id) { // Delete a product