changeset 217:cf3394d280c4

Added seqence to ort model.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 04 Jul 2013 11:41:26 +0200 (2013-07-04)
parents feedf35fddcf
children f4824d67afb0 e912a4658b0f
files src/main/java/de/intevation/lada/model/Ort.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/Ort.java	Thu Jul 04 08:48:26 2013 +0200
+++ b/src/main/java/de/intevation/lada/model/Ort.java	Thu Jul 04 11:41:26 2013 +0200
@@ -9,10 +9,13 @@
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
+import javax.persistence.SequenceGenerator;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
@@ -69,6 +72,8 @@
 
 	@Id
 	@Column(name = "ort_id", unique = true, nullable = false)
+	@SequenceGenerator(name = "ORT_ID_STORE", sequenceName = "ort_ort_id_seq", allocationSize = 1)
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ORT_ID_STORE")
 	public int getOrtId() {
 		return this.ortId;
 	}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)