[Lada-commits] [PATCH] Use dynamic update/insert for *_translation tables
Wald Commits
scm-commit at wald.intevation.org
Thu Apr 16 17:03:40 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1429196649 -7200
# Node ID afaee6f0f3eca15c3bf06b714e02aa28ffc286eb
# Parent 23ab3247b36eb07c6099d49b0c09d846a38c48a2
Use dynamic update/insert for *_translation tables
diff -r 23ab3247b36e -r afaee6f0f3ec src/main/java/de/intevation/lada/model/land/MessungTranslation.java
--- a/src/main/java/de/intevation/lada/model/land/MessungTranslation.java Thu Apr 16 15:50:02 2015 +0200
+++ b/src/main/java/de/intevation/lada/model/land/MessungTranslation.java Thu Apr 16 17:04:09 2015 +0200
@@ -17,6 +17,9 @@
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -25,6 +28,8 @@
*/
@Entity
@Table(name="messung_translation")
+ at DynamicInsert
+ at DynamicUpdate
public class MessungTranslation implements Serializable {
private static final long serialVersionUID = 1L;
@@ -36,7 +41,6 @@
@OneToOne
private LMessung messungs;
- @GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="messungs_id_alt")
private Integer messungsIdAlt;
diff -r 23ab3247b36e -r afaee6f0f3ec src/main/java/de/intevation/lada/model/land/ProbeTranslation.java
--- a/src/main/java/de/intevation/lada/model/land/ProbeTranslation.java Thu Apr 16 15:50:02 2015 +0200
+++ b/src/main/java/de/intevation/lada/model/land/ProbeTranslation.java Thu Apr 16 17:04:09 2015 +0200
@@ -17,6 +17,9 @@
import javax.persistence.OneToOne;
import javax.persistence.Table;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -25,6 +28,8 @@
*/
@Entity
@Table(name="probe_translation")
+ at DynamicInsert
+ at DynamicUpdate
public class ProbeTranslation implements Serializable {
private static final long serialVersionUID = 1L;
@@ -36,8 +41,7 @@
@OneToOne
private LProbe probe;
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="probe_id_alt")
+ @Column(name="probe_id_alt", insertable= true, updatable=true, nullable=true)
private String probeIdAlt;
public ProbeTranslation() {
More information about the Lada-commits
mailing list