changeset 203:d67665feb765

Added sequence generator to LOrt.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 02 Jul 2013 12:08:19 +0200 (2013-07-02)
parents ab7bb9e326f5
children a43caf307a98
files src/main/java/de/intevation/lada/model/LOrt.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/LOrt.java	Tue Jul 02 09:49:07 2013 +0200
+++ b/src/main/java/de/intevation/lada/model/LOrt.java	Tue Jul 02 12:08:19 2013 +0200
@@ -6,9 +6,12 @@
 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.SequenceGenerator;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
@@ -18,6 +21,7 @@
  */
 @Entity
 @Table(name = "l_ort", schema = "public")
+@SequenceGenerator(name = "LORT_ID_STORE", sequenceName = "l_ort_id_seq")
 public class LOrt implements java.io.Serializable {
 
 	private int POrtId;
@@ -48,6 +52,7 @@
 
 	@Id
 	@Column(name = "p_ort_id", unique = true, nullable = false)
+	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "LORT_ID_STORE")
 	public int getPOrtId() {
 		return this.POrtId;
 	}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)