changeset 98:7373563fdb51

Let the database generate the id for the probe.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 11 Jun 2013 11:11:18 +0200
parents 1663671fe441
children bd5c69c4b769
files src/main/java/de/intevation/lada/model/LProbe.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/LProbe.java	Tue Jun 11 11:10:51 2013 +0200
+++ b/src/main/java/de/intevation/lada/model/LProbe.java	Tue Jun 11 11:11:18 2013 +0200
@@ -6,6 +6,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.Temporal;
@@ -81,6 +83,7 @@
     }
 
     @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name = "probe_id", unique = true, nullable = false, length = 20)
     public String getProbeId() {
         return this.probeId;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)