From 10331ccbacbff885201eb33998007228c4caa962 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Sun, 13 Dec 2015 20:58:10 +0100 Subject: Fix Database autoincrement --- src/jpa/Product.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/jpa/Product.java') diff --git a/src/jpa/Product.java b/src/jpa/Product.java index 8196b73..92ec695 100644 --- a/src/jpa/Product.java +++ b/src/jpa/Product.java @@ -5,6 +5,8 @@ import java.math.BigDecimal; import java.util.Set; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; @@ -24,7 +26,7 @@ public class Product implements Serializable { private static final long serialVersionUID = 1L; - @Id + @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int id; @Lob -- cgit v1.2.3-70-g09d2