summaryrefslogtreecommitdiffstats
path: root/src/jpa/Category.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jpa/Category.java')
-rw-r--r--src/jpa/Category.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jpa/Category.java b/src/jpa/Category.java
index bbd832d..8b30db9 100644
--- a/src/jpa/Category.java
+++ b/src/jpa/Category.java
@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.Set;
import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQuery;
@@ -20,7 +22,7 @@ public class Category implements Serializable
{
private static final long serialVersionUID = 1L;
- @Id
+ @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
private int id;
private String description;