[Dive4elements-commits] [PATCH 2 of 2] Order MeasurementStations by station km

Wald Commits scm-commit at wald.intevation.org
Fri Oct 26 11:06:56 CEST 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351242410 -7200
# Node ID 87c3a3ac6ddf056161b1fe1cbfb868536a2fd29c
# Parent  1264fef59bfa01c7dfcdf5f1ebe80b79e7d62c9a
Order MeasurementStations by station km

Order the MeasurementStations of a river by the km of the station.

diff -r 1264fef59bfa -r 87c3a3ac6ddf flys-backend/src/main/java/de/intevation/flys/model/River.java
--- a/flys-backend/src/main/java/de/intevation/flys/model/River.java	Fri Oct 26 11:05:54 2012 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/model/River.java	Fri Oct 26 11:06:50 2012 +0200
@@ -13,6 +13,7 @@
 import javax.persistence.SequenceGenerator;
 import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
+import javax.persistence.OrderBy;
 import javax.persistence.JoinColumn;
 import javax.persistence.GenerationType;
 
@@ -124,6 +125,7 @@
 
 
     @OneToMany
+    @OrderBy("station")
     @JoinColumn(name="river_id")
     public List<MeasurementStation> getMeasurementStations() {
         return measurementstations;


More information about the Dive4elements-commits mailing list