[Lada-commits] [PATCH 2 of 9] Added annotations to probe id marking the field as generated value
Wald Commits
scm-commit at wald.intevation.org
Wed Feb 11 13:02:40 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1423655249 -3600
# Node ID 1a95ca383681bf6a2742965b5b994e7ae59d31b5
# Parent 7e8cbc69b784f80ecd898d4f715fc0921cf47f48
Added annotations to probe id marking the field as generated value.
diff -r 7e8cbc69b784 -r 1a95ca383681 src/main/java/de/intevation/lada/model/Probe.java
--- a/src/main/java/de/intevation/lada/model/Probe.java Wed Feb 11 12:46:29 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Probe.java Wed Feb 11 12:47:29 2015 +0100
@@ -11,6 +11,8 @@
import java.sql.Timestamp;
import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;
@@ -25,6 +27,8 @@
private static final long serialVersionUID = 1L;
@Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @Column(name="id", unique=true, nullable=false)
private Integer id;
@Column(name="ba_id")
More information about the Lada-commits
mailing list