diff --git a/code/exercise_010_Validation_and_PUT/src/main/java/com/lunatech/training/quarkus/Product.java b/code/exercise_010_Validation_and_PUT/src/main/java/com/lunatech/training/quarkus/Product.java index f4ff16f..4d8b223 100644 --- a/code/exercise_010_Validation_and_PUT/src/main/java/com/lunatech/training/quarkus/Product.java +++ b/code/exercise_010_Validation_and_PUT/src/main/java/com/lunatech/training/quarkus/Product.java @@ -1,24 +1,17 @@ package com.lunatech.training.quarkus; import io.quarkus.hibernate.orm.panache.PanacheEntity; -import io.quarkus.hibernate.orm.panache.PanacheEntityBase; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; -import org.hibernate.validator.constraints.Length; import jakarta.persistence.Entity; import jakarta.validation.constraints.DecimalMin; import jakarta.validation.constraints.Digits; import jakarta.validation.constraints.NotNull; +import org.hibernate.validator.constraints.Length; + import java.math.BigDecimal; @Entity -public class Product extends PanacheEntityBase { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - public Long id; +public class Product extends PanacheEntity { @NotNull @Length(min = 3) diff --git a/code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/Product.java b/code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/Product.java index f46f133..14b2d87 100644 --- a/code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/Product.java +++ b/code/exercise_015_Connecting_to_Kafka/src/main/java/com/lunatech/training/quarkus/Product.java @@ -1,24 +1,17 @@ package com.lunatech.training.quarkus; -import io.quarkus.hibernate.reactive.panache.PanacheEntityBase; +import io.quarkus.hibernate.reactive.panache.PanacheEntity; import io.vertx.mutiny.sqlclient.Row; +import org.hibernate.validator.constraints.Length; + import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; import jakarta.validation.constraints.DecimalMin; import jakarta.validation.constraints.Digits; import jakarta.validation.constraints.NotNull; -import org.hibernate.validator.constraints.Length; - import java.math.BigDecimal; @Entity -public class Product extends PanacheEntityBase { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - public Long id; +public class Product extends PanacheEntity { @NotNull @Length(min = 3)