[Lada-commits] [PATCH] Order result colums by the index stored in the db

Wald Commits scm-commit at wald.intevation.org
Thu Apr 7 15:56:20 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1460037374 -7200
# Node ID 2f6781557bea7c145b182cfe8fffed59a662089a
# Parent  51051e85348f37faca9db2c8f7ade63752cc79e5
Order result colums by the index stored in the db.

diff -r 51051e85348f -r 2f6781557bea src/main/java/de/intevation/lada/model/stamm/Query.java
--- a/src/main/java/de/intevation/lada/model/stamm/Query.java	Thu Apr 07 15:38:40 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stamm/Query.java	Thu Apr 07 15:56:14 2016 +0200
@@ -17,10 +17,9 @@
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
 import javax.persistence.Transient;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
 
 /**
  * The persistent class for the query database table.
@@ -52,6 +51,7 @@
 
     //bi-directional many-to-one association to Result
     @OneToMany(fetch=FetchType.EAGER, mappedBy="query")
+    @OrderBy("index")
     private List<Result> results;
 
     public Query() {


More information about the Lada-commits mailing list