changeset 1039:7339dd0f8a67 schema-update

Added Annotation to set the id to generated value.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 02 Sep 2016 14:02:54 +0200
parents 6f9983f68248
children ea550e9a09a3
files src/main/java/de/intevation/lada/model/stammdaten/DatensatzErzeuger.java src/main/java/de/intevation/lada/model/stammdaten/Favorite.java src/main/java/de/intevation/lada/model/stammdaten/FilterValue.java src/main/java/de/intevation/lada/model/stammdaten/MessprogrammKategorie.java src/main/java/de/intevation/lada/model/stammdaten/Ort.java src/main/java/de/intevation/lada/model/stammdaten/Probenehmer.java
diffstat 6 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/stammdaten/DatensatzErzeuger.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/DatensatzErzeuger.java	Fri Sep 02 14:02:54 2016 +0200
@@ -5,6 +5,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Transient;
@@ -20,6 +22,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     private String bezeichnung;
--- a/src/main/java/de/intevation/lada/model/stammdaten/Favorite.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/Favorite.java	Fri Sep 02 14:02:54 2016 +0200
@@ -4,6 +4,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 
 
@@ -16,6 +18,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     @Column(name="query_id")
--- a/src/main/java/de/intevation/lada/model/stammdaten/FilterValue.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/FilterValue.java	Fri Sep 02 14:02:54 2016 +0200
@@ -4,6 +4,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
@@ -18,6 +20,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     @Column(name="filter_id")
--- a/src/main/java/de/intevation/lada/model/stammdaten/MessprogrammKategorie.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/MessprogrammKategorie.java	Fri Sep 02 14:02:54 2016 +0200
@@ -5,6 +5,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 import javax.persistence.Transient;
@@ -20,6 +22,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     private String bezeichnung;
--- a/src/main/java/de/intevation/lada/model/stammdaten/Ort.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/Ort.java	Fri Sep 02 14:02:54 2016 +0200
@@ -5,6 +5,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.NamedQuery;
 import javax.persistence.Transient;
@@ -20,6 +22,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     private String aktiv;
--- a/src/main/java/de/intevation/lada/model/stammdaten/Probenehmer.java	Fri Sep 02 14:02:03 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/Probenehmer.java	Fri Sep 02 14:02:54 2016 +0200
@@ -5,6 +5,8 @@
 
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Transient;
 
@@ -18,6 +20,7 @@
     private static final long serialVersionUID = 1L;
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Integer id;
 
     private String bearbeiter;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)